Assign session value using javascript

后端 未结 4 1222
一生所求
一生所求 2020-12-19 21:36

Is there any way to assign session value using javascript

i can retrive the value from session but assigning is not working

var TempSession = \'<%         


        
4条回答
  •  再見小時候
    2020-12-19 22:38

    Actually there this a tutorial on MSDN that covers you case. It is described in Exposing Web Services to Client Script, see "Calling Static Methods in an ASP.NET Web Page" section.

    All you have to do is to set EnablePageMethods property to True on your ScriptManager control, then using PageMethods object call static method (it should be decorated with WebMethod attribute) declared in code behind.

提交回复
热议问题