Acessing textbox in usercontrol
Revision 3
This is my ascx code:
<script language="javascript" type="text/javascript">
function fnMsg() {
var value = document.getElementById('txt').value
}
</script>
<input id="txt" style="WIDTH: 12%" type="text" maxlength="10" name="txt" runat="server"/>
<input type="button" runat="server" value="click" önclick="fnMsg();" style="width: 33px" />
I couldnt get the value of text box in javascript.
The error is
document.getElementById('txt')
is undefined.
Is there anyway to access the value
Posted 14-Nov-12 20:40pm
by
Divya RS.