Cannot recieve click event on Link Button

D

developer1996

I have created a Web User Control with a link button on
it. I dynamically load this control on my default page.
In the Click event on my control I set x = 5. I just want
to see if I can generate and trap an event with in my
control but unfortuanetely I cannot. It appears events
are not being processed by my Web User Control. I know
this can be done can anyone help?
 
D

developer1996

I figuered it out. Any control in which you dynamically
load must be reloaded every time on postback events.
 
V

Victor Garcia Aprea [MVP]

Also, make sure you're adding the control at Init or Load to ensure proper
handling of viewstate, event-firing, etc

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

and not by private mail.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top