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

repeater button controls

Dear sir,

I have two button controls in a repeater, when clicked, it fire an event
R1_ItemCommand, but how can I know which button controls user click?? there
are two there???
Sub R1_ItemCommand(Sender As Object, e As RepeaterCommandEventArgs)
'button has just been clicked;
End Sub

regards,

Guoqi Zheng
http://www.ureader.com
Nov 19 '05 #1
2 1056
Guoqi:

You can cast the CommandSource property of the RepeaterEventArgs class to a
Button and examine its properties.

For example:

void R1_ItemCommand(Object Sender, RepeaterCommandEventArgs e) {
Label2.Text = "The " + ((Button)e.CommandSource).Text + " button has
just been clicked; <br>";
}
--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"guoqi zheng" <no@sorry.com> wrote in message
news:3f******************************@ureader.com. ..
Dear sir,

I have two button controls in a repeater, when clicked, it fire an event
R1_ItemCommand, but how can I know which button controls user click?? there are two there???
Sub R1_ItemCommand(Sender As Object, e As RepeaterCommandEventArgs)
'button has just been clicked;
End Sub

regards,

Guoqi Zheng
http://www.ureader.com

Nov 19 '05 #2
I used commandName and command arguments, it works now.

Thanks

regards,

Guoqi Zheng
http://www.ureader.com
Nov 19 '05 #3

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

Similar topics

3
by: anon | last post by:
I am having a hard time with makeing what I am trying to do work. I am making a questionaire web app. I have a custom control that has a label and 5 radio buttons. My problem is that each...
1
by: Fraggle | last post by:
I have a repeater with controls added at run time. the <template> also contains a <asp:textbox that is made visible on some repeater elements. when I come to read the text info out it has...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
4
by: huzz | last post by:
I am trying to access a DropDownList control inside a repeater using ItemCommand as shown below but for some reason i can't access the DropDownList. When i step through the debug i get <undefine...
0
by: Michael | last post by:
I've seen several posts relating to this problem, and tried EnableViewState="False", but it does not work for me. A twist in my problem is that I am adding the templates for the repeater...
1
by: olduncleamos | last post by:
Hello all, I am experimenting with the repeater control and ran into something that I wasn't expecting. I would appreciate if the experts can confirm or correct my understanding. Here is a...
7
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the...
4
by: Dennis E. Jones, Jr. | last post by:
I'm creating a dynamic control for each row in a REPEATER based on database values. ItemDataBound creates the control for the initial load (not postback), but I cannot get the control recreated...
2
by: Nemo | last post by:
Hi, I have i fishy problem when I have e Repeater with user controls. page_load { if (!isPostBack) { repeater.databind(); }
1
by: Øyvind Isaksen | last post by:
I need to know how to handle controls inside a repeater, how to send and recieve data from another page to one spesific control inside a repeater. Clue: I have a repeater that dynamicly lists...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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...

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.