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

Reference - Getting all values from a repeater control - asp.net

I did not see code for getting all values from a repeater control
posted anywhere. So, I figured it out and I am posting for the next
person that may need it (sorry if this seems obvious to you):

'''''''''''''''''''''''''''''''''''''

Dim strValue As String
Dim objCTL As Control

For Each objCTL In RepeaterExisting.Controls
strValue = objCTL.GetType.ToString
If strValue = "System.Web.UI.WebControls.RepeaterItem"
Then

Dim objCurrentRepeaterItem As RepeaterItem =
DirectCast(objCTL, RepeaterItem)

If objCurrentRepeaterItem.ItemType.ToString = "Item"
Or objCurrentRepeaterItem.ItemType.ToString = "AlternatingItem" Then

Dim objDDL As DropDownList =
DirectCast(objCurrentRepeaterItem.Controls(1), DropDownList)
Dim objDLC As DataBoundLiteralControl =
DirectCast(objCurrentRepeaterItem.Controls(0),
DataBoundLiteralControl)

lblMessage.Text = lblMessage.Text & " Drop down =
" & objDDL.SelectedValue & ", source = " & objDLC.Text() & "<BR>"

End If

End If

Next

''''''''''''''''''''''''''''''''''''''

Phin
Nov 18 '05 #1
0 1339

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

Similar topics

1
by: MattB | last post by:
I have a repeater control with text boxes in it that get built on the fly based on values in web.config. Now I need to grab the text from those boxes when the form is submitted. I can't just do...
0
by: mrwoopey | last post by:
I did not see code for getting all values from a repeater control posted anywhere. So, I figured it out and I am posting for the next person that may need it (sorry if this seems obvious to you): ...
1
by: MattB | last post by:
OK, never mind my last post. It was easy enough to refer to the table the repeater is bound to, but I made a big, incorrect assumption in that post. In my last post I thought I was successfully...
6
by: Tom Kaminski [MVP] | last post by:
On my code behind page, how can I reference a Label control that's included in a Repeater? In other words, given: <asp:Repeater id="Repeater1" runat="server"> <HeaderTemplate> <table> <tr>...
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: Patrick.O.Ige | last post by:
I'm DataBinding a CheckBoxList and i want to get the checkboxes selected when the page is loaded depending on a Boolean value from the Database.. chkDebtor.DataSource = objDR...
3
by: renil | last post by:
I have a repeater control that displays info. from a datatable. Each row in the repeater has a checkbox. Also, I have a delete linkbutton outside the repeater control. What I'm trying to do when...
2
by: AC [MVP MOSS] | last post by:
I have a repeater with a header, footer, and item template. The item template is the only one with server controls (hyperlinks, labels, and a nested repeater). Within the top repeater, I'm handling...
3
by: champ.supernova | last post by:
I have a repeater containing dropdownlists. This subroutine is called when the selected index on one of these dropdownlists is changed... Public Sub cmbProductType_SelectedIndexChanged(ByVal...
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:
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
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
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.