Sync Javascript with ASP.Net

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




I have an <asp:label id="lblPrice" runat="server"/> tag that I update
on the client side using Javascript by referring to the object ID
_ctl0_lblPrice.

The Javascript does client-side calculations depending on the user's
selections of choices on the web form.

The problem I have is that ASP.Net does not seem to know anything about
the changes made by Javascript upon postback.

My question is: how do I get ASP.Net to know the latest client-side
updates to lblPrice without having to duplicate the client-side
calculations on the server side ?

Please advise with examples as this is new territory for me. Please
note I can get Javascript to modify ASP.Net objects, but I cannot get
ASP.Net to see any updates Javascript has made to these objects.
Having Javascript post the updates back to ASP.net in a request object
defeats the purpose of what I am looking for. I need to have ASP.Net
detect the latest updates Javascript made to the <asp:label> object.

Aladdin Nassar

.



Relevant Pages

  • Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.
    ... In my form I have an area where the user enters in the payment amount: ... to put in the dollar AND cents? ... If you want it squarely on the client side, then use javascript. ... client-side via a client-side language like JScript, VBScript, etc. ...
    (php.general)
  • Re: Need to start over on a project: vb or c#?
    ... development; server-side and client-side. ... The client requires mastery of JavaScript and even more so now with AJAX and ... JavaScript and C# syntax is exactly ... controls right in the declaration. ...
    (microsoft.public.dotnet.framework.aspnet)
  • What future holds for Javascript? [WAS: Store the answer to a question]
    ... JavaScript - refers to the client-side language used in Gecko ... JScript - refers to the language trademark reserved by Microsoft ... Corporation and latter in Mozilla Foundation, ...
    (comp.lang.javascript)
  • Re: client side vs server side events for controls
    ... Client-side VBScript is not supported by all browsers. ... JavaScript is. ... >>> date when that textbox loses the focus. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Saving dynamically created data on client side?
    ... do this client-side only, cross-browser/OS. ... the server into a cgi/php, temporarily storing the file on the server. ... scripting at all. ... Prototype.js was written by people who don't know javascript for people ...
    (comp.lang.javascript)