KeyPress Event

G

Guest

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
 
N

Noldis Chumacero

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top