Saturday, July 28

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).


     var EmployeeID = '<%= Session["EmployeeID"] %>';





Step-1 Remove the "=" sign from the tag and replace it with a "#" sign.

         var EmployeeID = '<%# Session["EmployeeID"] %>';


Step-2 Write "Page.Header.DataBind();" in the Page_Load Event of your page.

Now, it will work perfectly.


Thanks Shibashish Mohanty

No comments:

Post a Comment

Please don't spam, spam comments is not allowed here.

.

ShibashishMnty
shibashish mohanty