jeff Lee
asked on
After use updatepanel control, can't detect which key I press
Hi,
The following is my code- To detect which key I press, and it can work well.
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Cont entPlaceHo lder1">
<script language="VBScript" type="text/vbscript">
Sub document_onkeydown()
if (window.event.keyCode="113 ") then
document.getElementById("< %=A.Client ID %>").focus()
elseif (window.event.keyCode="121 ") then
document.getElementById("< %=B.Client ID %>").focus()
elseif (window.event.keyCode="118 ") then
document.getElementById("< %=C.Client ID %>").checked=true
elseif (window.event.keyCode="119 ") then
document.getElementById("< %=D.Client ID %>").checked=true
document.getElementById("< %=E.Client ID %>")
elseif (window.event.keyCode="120 ") then
document.getElementById("< %=F.Client ID %>").checked=true
End If
End Sub
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" ViewStateMode="Enabled"
UpdateMode="Conditional">
<ContentTemplate>
.......
.......
</asp:UpdatePanel>
</asp:Content>
Now I use updatepanel control in asp.net(VB),I can't detect which key I press. What is this error and how can I resolve it ? Thanks.
The following is my code- To detect which key I press, and it can work well.
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Cont
<script language="VBScript" type="text/vbscript">
Sub document_onkeydown()
if (window.event.keyCode="113
document.getElementById("<
elseif (window.event.keyCode="121
document.getElementById("<
elseif (window.event.keyCode="118
document.getElementById("<
elseif (window.event.keyCode="119
document.getElementById("<
document.getElementById("<
elseif (window.event.keyCode="120
document.getElementById("<
End If
End Sub
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" ViewStateMode="Enabled"
UpdateMode="Conditional">
<ContentTemplate>
.......
.......
</asp:UpdatePanel>
</asp:Content>
Now I use updatepanel control in asp.net(VB),I can't detect which key I press. What is this error and how can I resolve it ? Thanks.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.