|
-
November 5th, 2002, 10:09 PM
#1
Buttons inside a Repeater
I have a Linkbutton control inside the template for a Repeater control.
So far, all i have been able to find out is that you can get the text of the linkbutton through the repeaters ItemCommand method, but all my link buttons have the same text.
Does anyone have any strategies for putting buttons inside a repeater or datalist?
-
November 11th, 2002, 08:43 AM
#2
You're question is a little broad. Can you be more specific?
Mike Huguet
Senior Consultant
Software Architects, Inc.
MCSD, MCDBA, MCSA
-
May 10th, 2005, 02:39 AM
#3
Re: Buttons inside a Repeater
Yeah, well, I see no problem in that. But I suppose, that the ID's (not caption) are not all the same (in which case you ought to change your code)
I use this in the repeater_ItemCommand()
Code:
System.Web.UI.Control c = ((System.Web.UI.Control)(((System.Web.UI.WebControls.WebControl)(((System.Web.UI.WebControls.LinkButton)(((System.Object)(e.CommandSource))))))));
switch (c.ID)
{
case "LinkBtn_Abonnent":
arr1.Sort(new abon_data.Comparer_SAPComp(SAPDefines.SAP_ORDERBY_ABONNENT));
break;
That won't mind the caption being the same on all link buttons :-)
/Lars
-
May 10th, 2005, 09:47 PM
#4
Re: Buttons inside a Repeater
Actually you want to utilize the COMMANDNAME property of the LinkButtons to differentiate between them.
Good Luck,
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|