Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / Javascript

Acessing textbox in usercontrol

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
14 Nov 2012CPOL 3.1K  
This is my ascx code: function fnMsg() { var value = document.getElementById('txt').value } <input id="txt" style="WIDTH: 12%" type="text" maxlength="10" name="txt" ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
14 Nov 2012n.podbielski
If you are using asp.net 4 you can use Instead of your server side html tag.Or obtain client id of this tag in aspx/ascx var id="";
Please Sign up or sign in to vote.
14 Nov 2012Manfred Rudolf Bihy
The ID attribute of a HTML tag that is modified with the runat="Server" attribute changes. This ID is only available on the server side now and to get the ID of that tag as it is rendered in the HTML sent to the browser you'll have to user See here: <script...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions