Why can’t I pass my Object into session created in Webservice?
[WebMethod]
public void UpdatedData(string CountryName, string CountryCode,
string City, string RegionCode, string RegionName)
{
Chat ch = new Chat();
ch.CountryName = CountryName;
ch.CountryCode = CountryCode;
ch.City = City;
ch.RegionCode = RegionCode;
ch.RegionName = RegionName;
Session["Chat"] = ch; //object Refrence not set to instance of an object
}
1 Answer