G
Guest
Hi folks,
first off, I'm using .Net framework 1.1 with ASP.net and C#
I'm trying to do something very simple...but I can't figure it out
I have an <asp:button runat="server"> in the test version of my app that is
essentially a backdoor for changing the class of user inside the application
on the fly....it has a textbox next to it
you can type 1, 2, 3, 4 etc.. in the text box and when you click the button
it changes the whole context of the application, the screen have more or less
tabs etc..
this is the hard part...the easy part is that I never ever want this button
to be fired with 'Enter' or 'Return' being pressed or in fact any key, I want
this button to be only mouse-clickable (because our tester is pressing keys
madly to test the app and constantly fires this button, and we protest that
this backdoor will not be available in the release version) but to no avail.
....I can't figure out a property that will do this so I've resorted to
Javascript without sucess (getting onKeypress examples from the web, which
check for Enter and return's codes)
the trouble is the event never fires...
is this to do with the fact that it's a runat Server and it nevers sees the
javaScript, or is it that you can't trap keystrokes for buttons only for
textboxes etc... if anyone has solved this seemingly trivial but intractable
problem I would greatly appreciate their help
Thanks in advance and Regards,
CharlesA
first off, I'm using .Net framework 1.1 with ASP.net and C#
I'm trying to do something very simple...but I can't figure it out
I have an <asp:button runat="server"> in the test version of my app that is
essentially a backdoor for changing the class of user inside the application
on the fly....it has a textbox next to it
you can type 1, 2, 3, 4 etc.. in the text box and when you click the button
it changes the whole context of the application, the screen have more or less
tabs etc..
this is the hard part...the easy part is that I never ever want this button
to be fired with 'Enter' or 'Return' being pressed or in fact any key, I want
this button to be only mouse-clickable (because our tester is pressing keys
madly to test the app and constantly fires this button, and we protest that
this backdoor will not be available in the release version) but to no avail.
....I can't figure out a property that will do this so I've resorted to
Javascript without sucess (getting onKeypress examples from the web, which
check for Enter and return's codes)
the trouble is the event never fires...
is this to do with the fact that it's a runat Server and it nevers sees the
javaScript, or is it that you can't trap keystrokes for buttons only for
textboxes etc... if anyone has solved this seemingly trivial but intractable
problem I would greatly appreciate their help
Thanks in advance and Regards,
CharlesA