troubleshooting Question

How to dynamically add a linkbutton and a text field to a page and be able to access events on the server side?

Avatar of louisiana_blues
louisiana_blues asked on
.NET ProgrammingVisual Basic.NET
2 Comments1 Solution224 ViewsLast Modified:
Hi all experts!

I am trying to add a link button and a text box to a page dynamically.  I don't have any problems with the reload recognizing the link and text values, but I'm stumped when it comes to how to access the important events (onclick for the linkbutton and textchanged and onentry and onexit from the text box) in the dynamic control.

With the linkbutton, one cannot access the OnClick, since it is a protected method (why?  what's wrong w/allowing us to add our own events to this?).  And for the textbox, I don't even see any way of capturing these events server-side.

Could someone show me some code that accomplishes these two things?

Thanks in advance for your expertise.  Since this is an advanced question, 500 pts to the expert who shows, with either C# or VB, how to accomplish this w/ASP.NET 2.0 web controls.
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros