Passing JavaScript variable names and values from server script (ASP.NET) -
What are some good ways to deal with this mess of JavaScript and unnecessary and not really dealing with dynamic generation:
var , '' lt;% # chart path% & gt; ',' <% # helper; resolve url ("~", true)%>); & Lt;% # JavaScript ID% & gt; Int ();
I have come to know this, but the answers do not seem to address the source of odor.
I have some specific problems:
- JavaScript ID is a variable name why should the client-side variable name be defined on the server side?
- CurrentUserId does not ever change for user ... this is their user id GetBaseUrl () and ResolveUrl (" ~ ") ... why should I get stability at all places?
- I have to open the Aspx.cs codebehind file to debug, and can not use Intellisense.
I have developed some ideas to deal with the above issues (a global "application" object, declaring jQuery + declare classes on DOM elements), but I have more on this I want to hear ideas.
I do not know that it solves your exact problem, but may be interested by Rick Stahra .
Comments
Post a Comment