473,386 Members | 1,828 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,386 software developers and data experts.

Dynamic LinkButton - how to catch the event?

Hi,

I've a page where a show a person with some familymembers. For each
familymember I'm creating a LinkButton, which will update the page and show
him during the postback.
The problem is that the events for the LinkButtons doesn't fire because I'm
not rebuilding them during the Page_Load (which is totally unneccessary).
Is there another way to to do what I want? Some way of bringing me
information about which of the many LinkButtons that where pressed...

Best regard

Robert Warnestam
Nov 18 '05 #1
2 2788
You could look at the __EVENTTARGET form field, which should get generated.
I think it should be set to the ID of the control that was clicked.

But in general, it's doubtful that regenerating the linkbuttons would be so
costly. It might be easier to just rerun that code.

"Robert Warnestam" <rw@codab.se> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
Hi,

I've a page where a show a person with some familymembers. For each
familymember I'm creating a LinkButton, which will update the page and show him during the postback.
The problem is that the events for the LinkButtons doesn't fire because I'm not rebuilding them during the Page_Load (which is totally unneccessary).
Is there another way to to do what I want? Some way of bringing me
information about which of the many LinkButtons that where pressed...

Best regard

Robert Warnestam

Nov 18 '05 #2
Thanks for your response,
You could look at the __EVENTTARGET form field, which should get generated. I think it should be set to the ID of the control that was clicked.
Could you please explain it more - The ID is not neccessary but can I
retrieve CommandName & CommandArgument?
But in general, it's doubtful that regenerating the linkbuttons would be so costly. It might be easier to just rerun that code.


Regenerating the linkbuttons would need me to make several sql request to
retrieve information about a person and his family - information that I
don't intend to use cause the event will trigger another person to show.

Nov 18 '05 #3

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

Similar topics

0
by: Pat Sagaser via .NET 247 | last post by:
I'm trying to add LinkButtons to a Repeater control using adynamic template. The docs state that you should be able tobubble the click event to the containing Repeater. There areplenty of examples in...
1
by: Peter Wu | last post by:
Hello Group, I create a class that inherits from the System.Web.UI.WebControls.DataGrid class. Basically, what I want to do is to dynamically add a Table that contains some numbers for paging....
1
by: RSB | last post by:
Hi Everyone, I have a collection of items and i am generating a Dynamic Table based on this Collection and i am also adding a Remove Linkbutton at the End for Each Row. I have created a...
2
by: RJN | last post by:
Hi Sorry for posting again. I have a datagrid which is put inside a div tag to make it scrollable. I need to page the datagrid. The page numbers appear at the bottom of the datagrid and has...
0
by: BLiTZWiNG | last post by:
I have scoured the web to no avail. Any post that resembles my problem has no answer. I have an asp table on my page. I add rows and cells to it at run time with info provided from a database in...
4
by: EvelynAnd Ethan | last post by:
Hi, ItemCommand event not firing from a dynamic user control ,WHERE A DATAGRID HAS BUTTON,when i click on the linkbutton first time the itemcommand event doesnt fire,second time event fires up ...
4
by: Fueled | last post by:
Hi everyone! I've made quite a lot of research on this, and I've tried a couple of proposed solutions. Nothing has worked for me, but I feel there's not much I'm missing. So I'm turning to this...
1
by: geronimi | last post by:
I want to create a linkbutton in a cell because not every row needs one (so I can't setup a linkbuttoncolumn instead of a boundcolumn.) First, i create a linkbutton in the datagrid_ItemDataBound...
2
by: WolfyUK | last post by:
Hello, I have a standard asp:DataGrid called CasesGrid that I wish to write my own paging controls for. The aim is to get something like the following rendered to screen: << First < Previous...
13
by: rn5a | last post by:
In a shopping cart app, suppose a user has placed 5 orders, I want to show him 5 LinkButtons (one for each order) so that when he clicks the first LinkButton, he would be shown the details of his...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.