Re: KeyPress Event

Tech-Archive recommends: Speed Up your PC by fixing your registry




Dusty,

If you need to put an event in your controls you can make it on the
construction of the webform and adding the properties

e.i.

If Not Me.Page.IsPostBack Then
Me.txtLinea.Attributes.Add("OnKeyPress", "JavaScript:return
handleEnter(this, event, 1)")
Me.txtForma.Attributes.Add("OnKeyPress", "JavaScript:return
handleEnter(this, event, 1)")
End If

--
Ing. Noldis Chumacero Chávez
Departamento de Sistemas
AeroSur S.A.
Santa Cruz de la Sierra, Bolivia
Telf. 3364446(236) 77074919

"Dusty Hackney" <DustyHackney@xxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el
mensaje news:C4A9A98B-80B7-4EEB-B9BB-45634F712762@xxxxxxxxxxxxxxxx
Hello,

I am programming aspx pages in VB ASP.NET. When using Windows forms, I am
able to use an event called KeyPress. However, I haven't been able to get
this to work in a Web Form. What do I need to do to be able to use the
KeyPress Event in a Web Form?

Thanks,
Dusty Hackney





.



Relevant Pages

  • UserControl
    ... I created a user control called temp1.ascx which contains several textboxes ... I also have a webform name Web1.aspx. ... In the web form temp1.ascx, ... 1/ Why does my usercontrol disappear after I hit the submit button? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: partial classes
    ... Phil Townsend wrote: ... with the webform. ... For a web form, I don't think there *is* another part other than the ... page inherits the partial class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Disabling the enter key aon a Web-form
    ... the keypress event of the enter key and react accordingly. ... John Timney (MVP) ... asp.net Web form the entire form refreshes? ...
    (microsoft.public.dotnet.framework.aspnet)
  • why every button click opens up a new window? Office PIA
    ... I have a command button and it activates a web form, ... Now, inside the webform, I I try to retrieve some data from a ... up the webform in a NEW word document instead of the current document. ...
    (microsoft.public.office.developer.com.add_ins)
  • fire an image button click event using javascript
    ... I want to catch an 'enter' keypress event on a web form and submit the form ... This will work fine if 'iBtnSubmit' is an input type of 'Button' but the ... is rendered by the server as an input type of 'image' which does not have a ...
    (microsoft.public.dotnet.framework.aspnet)