S
simon
I have my user control and inside that control I have textBox:
<asp:TextBox Runat=server AutoPostBack=True ID=txtListBox
onkeydown="filter()"></asp:TextBox>
<script language="vbscript">
sub filter
msgbox document.getElementById("txtListBox").value
end sub
</script>
The id of my textBox is txtListBox.
Than I use my control on the page:
<%@ Register TagPrefix ="CustomListBox" TagName = "orders" Src =
"userControls\customListBox.ascx"%>
<CustomListBoxrders runat="server" id="order1"></CustomListBoxrders>
and when the page is rendered I get input box:
<input name="order1:txtListBox" type="text"
onchange="__doPostBack('order1$txtListBox','')" language="javascript"
id="order1_txtListBox" onkeydown="filter()" />
The id of this input is not "txtListBox" but "order1_txtListBox" so my
script won't work.
How can I solve this problem?
Thank you,
Simon
<asp:TextBox Runat=server AutoPostBack=True ID=txtListBox
onkeydown="filter()"></asp:TextBox>
<script language="vbscript">
sub filter
msgbox document.getElementById("txtListBox").value
end sub
</script>
The id of my textBox is txtListBox.
Than I use my control on the page:
<%@ Register TagPrefix ="CustomListBox" TagName = "orders" Src =
"userControls\customListBox.ascx"%>
<CustomListBoxrders runat="server" id="order1"></CustomListBoxrders>
and when the page is rendered I get input box:
<input name="order1:txtListBox" type="text"
onchange="__doPostBack('order1$txtListBox','')" language="javascript"
id="order1_txtListBox" onkeydown="filter()" />
The id of this input is not "txtListBox" but "order1_txtListBox" so my
script won't work.
How can I solve this problem?
Thank you,
Simon