|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Setting control value in JavascriptHi
When I use JS to set a value of, say, a textbox how can I have that value posted back? When my code-behind runs I cannot see a way of identifying the value populated by the JS. Thanks Kev Hi,
how does it matter by which (user or JS) the input has been changed? You still get the input via TextBox's Text property as long as the TextBox itself is server-side control. If you need to identify by which one the input was made, you can populate separate, server-side, hidden INPUT field which you could read on postback so that it indicates which one, user or JS code, made the change to the data (js code could change its value at the same time when it changes TextBox's text). "Teemu Keiski" <jot***@aspalliance.com> wrote in message That's what I did in the end, thanks.news:OztDcGvhFHA.1464@TK2MSFTNGP14.phx.gbl... > Hi, > If you need to identify by which one the input was made, you can populate > separate, server-side, hidden INPUT field which you could read on postback > so that it indicates which one, user or JS code, made the change to the > data (js code could change its value at the same time when it changes > TextBox's text). Kev
Custom control: How to render an embedded image at design-time?
Render and Image on a Button Can aspnet simulate windows pane separator? Please Help: ListBox.SelectedItem returns null Web User Controls: Exposing Items property of contained controls Load User Control from different directory Collection with the correct object type on the Collection dialog DropDownList <optgroup> Tool to monitor/trace all method calls? WinForm as ASP.NET custom control |
|||||||||||||||||||||||