I want to put that full html in my page in experiment with the webservice but the set up session throws this exception .
The object reference is not set for an example of an object.
My Functions
[WebMethod (Description = "Gsetsession")] [ScriptMethod (UseHttpGet = false)] Public Zero Set Session (string HTML) {HttpContext.Current.Session ["html"] = html; } [WebMethod (Description = "GetSession")] [ScriptMethod (UseHttpGet = false)] Public string GetSession () {If (HttpContext.Current.Session ["html"]! = Null) {return HttpContext.Current.Session [" HTML "] ToString () .; } Other {return ""; }}
In your web methods, make sure you enable session
[WebMethod (description = "get session", EnableSession = true)]
No comments:
Post a Comment