Re: asp.net HiddenField ClientId

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



"Alberto Poblacion" <earthling-quitaestoparacontestar@xxxxxxxxxxxxx> wrote in message news:eO7p3IAOJHA.1668@xxxxxxxxxxxxxxxxxxxxxxx
[...]
I do not understand anything. I have the simpliest code I can have and it doesn't work. I can't see even alert.. in firebug I don't have any error.
Why it doesn't work ?

<body>
<script type="text/javascript">
function click()
{
alert('here1');
(document.getElementById('<%=this.txtSelectedRow.ClientID%>')).Text = "bbb";
}
</script>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtSelectedRow" runat="server" ></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="click()" />
</div>
</form>
</body>

Thanks for help

.


Quantcast