Delimeters problem in asp.net 3.5
I wrote the following code in aspx page in visualstudio2008 using asp.net 3.5
<script type="text/javascript">
<%
int RecordsPerPage =GridView1.PageSize;
%>
var RecordsPerPage =<%=RecordsPerPage %>;
</script>
This code works perfectly in asp.net 2.0
But when I run it it gives runtime error
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
How to solve it.
Regards,
Jijish.
|