Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   LinkButton event not firing (http://www.velocityreviews.com/forums/t97108-linkbutton-event-not-firing.html)

Mantorok 02-21-2005 12:18 PM

LinkButton event not firing
 
Hi

I have a control generator that is creating controls on the fly, one of the
controls is a LinkButton, the problem is that the Click event is not firing,
any ideas?

Example:

private void SomeFunc()
{
LinkButton link = new LinkButton();

link.Click += new EventHandler(link_Click);

private void link_Click(object sender, EventArgs e)

}

{

ObjectList.Show(new ValueRef(bo.Self, "Entries"));

}

Thanks

Kev



Karl Seguin 02-21-2005 01:44 PM

Re: LinkButton event not firing
 
Kev:
SomeFunc() needs to execute on Postback. Since they controls are
dynamically generated, when the page is posted back, the controls no longer
exist and thus must be re-recreated.

Check out
http://www.denisbauer.com/ASPNETCont...aceholder.aspx
which might be able to offer some help.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"Mantorok" <none@tiscali.co.uk> wrote in message
news:cvcjjd$64d$1@newsfeed.th.ifl.net...
> Hi
>
> I have a control generator that is creating controls on the fly, one of

the
> controls is a LinkButton, the problem is that the Click event is not

firing,
> any ideas?
>
> Example:
>
> private void SomeFunc()
> {
> LinkButton link = new LinkButton();
>
> link.Click += new EventHandler(link_Click);
>
> private void link_Click(object sender, EventArgs e)
>
> }
>
> {
>
> ObjectList.Show(new ValueRef(bo.Self, "Entries"));
>
> }
>
> Thanks
>
> Kev
>
>





All times are GMT. The time now is 07:37 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.