C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » JavaScript »

System.Web.HttpException:


Posted Date: 07 Nov 2009      Posted By: Uthaman      Member Level: Bronze     Points: 1   Responses: 1



Hi,
In code behind, i declared a variable public int businesslocationid = 0;(Master Page)

In sourcepart, I'm using the following line in java script.

window.onload = function()
{
var locid='<%=businesslocationid %>'

}

I'm getting the following error:

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

please calrify.





Responses

Author: Shameer    08 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

If you're using Master Pages in ASP.NET and trying to resolve <script> or <style> references in the page head, you may have got this error.
When you add the runat=”server” attribute to the <head> tag, the runtime treats it as an HtmlHead control. The HtmlHead control has the ability to parse child <link> controls contained withing it, so that when a content page is rendered, the URL in the href attribute points to the correct file.



Post Reply
You must Sign In to post a response.
Next : Compare user date to system date
Previous : A floating image in div
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use