A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Thursday, July 24, 2008

Problem with creating class instance in AJAX enabled application.

Hi All,

    I am using AJAX enabled asp.net application. In my web service i have 2 classes as below.

public class Address
    {
        public string street1;
        public string street2;
    }

    public class UserInformation
    {
        public string firstName;
        public string lastName;
        public int age;
        public int userId;
        public Address address;
    }

 Now in aspx page i am able create instance of UserInformation class but not for Address class as below.

var userInfo = new Samples.AspNet.UserInformation();

userInfo.address user_address = new Samples.AspNet.Address();   -- Here the code is failing

and want to assign value as below.

user_address.street1 = 'test';

user_address.street2 = 'test1'; 

 

 

 



Source Click Here.

No comments:

Post a Comment

Post your comments here:

Originals Enjoy