473,394 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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
Nov 19 '05 #1
1 3938
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" <no**@tiscali.co.uk> wrote in message
news:cv**********@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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bill | last post by:
I'm trying to dynamically build several linkbuttons and wire them up to a method called OnLinkClick . . . For the life of me, I don't understand why the code below isn't firing the event. ...
0
by: Glenn Owens | last post by:
OK, this should be simple but... I have a dynamically created DataGrid (which is a Composite Server Control that I've written - inheriting from the System.Web.UI.Webcontrols.DataGrid). The grid...
0
by: Solomon Shaffer | last post by:
This is very interesting - and odd. I have a number of LinkButtons that are created in a custom data grid that I created. The purpose of the LinkButtons is to provide alphabetical filtering...
3
by: JoakimR | last post by:
Hello, I have a problem with events not firing. I've created a web user control which renders a calendar using a table control. In two cells I'm adding LinkButtons for "prev/next month". However,...
2
by: prashant khandalkar via DotNetMonster.com | last post by:
Hello everyone. I am using asp:linkbutton in my web page. But when i click on the linkbutton it is not firing the click event please help me. It's urget my email address is pkhandalkar@gmail.com....
1
by: alexmac262 | last post by:
Please forgive as I have never posted to a group before and this is my first attempt at getting help on the internet. Inside an update panel I have a linkButton in a Gridview control template...
6
by: Mel | last post by:
I have a website that allows the user to generate a new quote. When they are finished creating the quote, it brings them to the final page (called the Goodbye.aspx page) which just states the...
2
by: Mufasa | last post by:
I have code to dynamically generate some link buttons (It's not know how many are needed until runtime.) I am adding the linkbutton to a cell in a table and the adding works fine. It's firing of...
0
by: jeenajos | last post by:
Hi all, I dono wat happen to my code. It was working quite fine. But now link button click event is not firing. This linkbutton was used for navigation; first,next,previous,last. Can anyone...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.