Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Cannot recieve click event on Link Button

Reply
Thread Tools

Cannot recieve click event on Link Button

 
 
developer1996
Guest
Posts: n/a
 
      07-07-2003
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?
 
Reply With Quote
 
 
 
 
developer1996
Guest
Posts: n/a
 
      07-07-2003
I figuered it out. Any control in which you dynamically
load must be reloaded every time on postback events.
>-----Original Message-----
>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?
>.
>

 
Reply With Quote
 
 
 
 
Victor Garcia Aprea [MVP]
Guest
Posts: n/a
 
      07-08-2003
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.
"developer1996" <(E-Mail Removed)> wrote in message
news:78ee01c344a7$3e5ac870$(E-Mail Removed)...
> I figuered it out. Any control in which you dynamically
> load must be reloaded every time on postback events.
> >-----Original Message-----
> >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?
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Web Controls 0 05-25-2004 01:45 AM



Advertisments