Pages

Thursday 26 July 2012

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.




Regards,
Prajanuranjan....

No comments:

Post a Comment

Total Pageviews