Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I can create a textbox and assign the control at runtime, and retrieve data with no problem.

 

Is there a way I can assign one of my functions in my code at designtime as the event handler for the new control at runtime?

 

In other words, I want to create a data validation keypress event, at designtime, and at runtime create a textbox and assign it's keypress event to the one in the module. Please help, thanks.

www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
  • *Experts*
Posted

Look into the AddHandler keyword. It will add a handler for an event for a control at runtime.

AddHandler object.event, AddressOf  methodtobethehandler

  • 2 years later...
Posted
hello sir i am tanmoy.i have created a textbox in runtime.now i want to assign some events from this runtime controll.like retrive the value of the textbox or click event.please tell me how can i do this as quick as possible.thank you.my email id is:sadhuambarish2005@yahoo.co.in
Posted

Retrieving the value of a textbox would assumbably be done using the .Text property which is not an event but a property. Adding a click event is reasonably simple, and there is already an example of how this is achieved in VB.Net

AddHandler object.event, AddressOf  methodtobethehandler 

Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...