473,513 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

events for controls in a Table server control

I have a Table server control with several link buttons. How do I generate
the click events for each of these controls? I can't double click on them
or go into the properties of the linkbuttons to generate the event like I
usually do using VS.NET and C#. I could explicitly type out the event
handler into the InitializeComponent() method, but that usually makes VS.NET
freak out down the line when I start messing with the web designer generated
code.

Suggestions? See the .aspx code below.

<asp:Table id="Table2" runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:LinkButton runat="server" ID="lnkSomeLinkButton">My link
button</asp:LinkButton>
</asp:TableCell>
</asp:TableRow>
</asp:Table>

Thanks in advance.
Mark
Nov 18 '05 #1
1 961
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:uu**************@TK2MSFTNGP11.phx.gbl...
I have a Table server control with several link buttons. How do I generate the click events for each of these controls? I can't double click on them
or go into the properties of the linkbuttons to generate the event like I
usually do using VS.NET and C#. I could explicitly type out the event
handler into the InitializeComponent() method, but that usually makes VS.NET freak out down the line when I start messing with the web designer generated code.

Suggestions? See the .aspx code below.

<asp:Table id="Table2" runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:LinkButton runat="server" ID="lnkSomeLinkButton">My link
button</asp:LinkButton>
</asp:TableCell>
</asp:TableRow>
</asp:Table>


You can add something like this:

lnkSomeLinkButton.Click += new EventHandler(lnkSomeLinkButton_Click);

after the base.OnInit(e); call in OnInit.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2

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

Similar topics

8
1810
by: John Smith Jr. | last post by:
I am looking for some way to persist a table web control so when page_load event comes up, i can display the table as it was. I tried using ViewState with the rows collection but that didn't work...
1
2534
by: Susan Geller | last post by:
I have a table server control (System.Web.UI.WebControls.Table) on my form that has three columns. Sometimes I need the second column to be invisible, sometimes the third. How can I set a column...
1
1516
by: dasein fiasco | last post by:
I'm sure this is a design question that is commonly encountered, but I can't find any resources which explain how to solve it. I would deeply appreciate any advice. Basically, when building a...
7
2973
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
4901
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
2
1308
by: harel.moshe | last post by:
Hey everybody, I'm looking for a way to attach non-void events to a server control i wrote. Relevant code parts: the control: mycontrol : WebControl {
2
1087
by: Raj Dhrolia | last post by:
Hi Everyone, I have some HTML snippets (with about 15 HTML controls) that needs to be embedded into my server control. I need these HTML controls on client side for some processing (JS). What...
1
1726
by: Seth Petry-Johnson | last post by:
Is there a way to compile a user control into a redistributable assembly , but still have access to its child controls using the .Controls property? Here's what I mean: I have a user control...
0
1316
by: tonyduckett | last post by:
Hi I am trying to build a composite server control that allows the user to embed their own markup and hookup their own events. The control fires up a highly stylised modal popup. Anyone using...
0
7264
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
7166
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
7386
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
7543
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
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.