473,508 Members | 2,130 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DropDownList in asp.net C#

Sl1ver
196 New Member
here is the code in the website

I have a repeater, The DropDownList, this is where I need to send the corresponding data from the DataView with to my event in C# page.

How would I do this?

Expand|Select|Wrap|Line Numbers
  1.  
  2. <asp:Repeater ID="atHomeRep" runat="server">
  3.   <HeaderTemplate>
  4.     <table cellpadding="0" cellspacing="0">
  5.       <tr>
  6.         <td colspan="2" class="CbbTableWhiteLine">&nbsp;</td>
  7.       </tr>
  8.   </HeaderTemplate>
  9.   <ItemTemplate>
  10.     <tr>
  11.       <td class="style2" style="width: 320px;">
  12.         Shipped: <%# String.Format("{0:D}", ((DataRowView)Container.DataItem)["dtedateadded"].ToString())%>
  13.       <br>
  14.       <%# String.Format("{0:D}", ((DataRowView)Container.DataItem)["vctitlename"]).Replace("@", " - ")%>
  15.        -
  16.       <%# String.Format("{0:D}", ((DataRowView)Container.DataItem)["vctitlediscname"]) %>
  17.       <br> 
  18.       <br>
  19.     </td>
  20.  
  21.     <td class="style3" style="width: 320px;">
  22.       <asp:DropDownList ID="atHomeRate" runat="server" 
  23.           AutoPostBack="true" 
  24.           AppendDataBoundItems="False"
  25.           OnSelectedIndexChanged="atHomeRate_SelectedIndexChanged">
  26.           <asp:listitem>1 Star</asp:listitem>
  27.           <asp:listitem>2 Stars</asp:listitem>
  28.           <asp:listitem>3 Stars</asp:listitem>
  29.           <asp:listitem>4 Stars</asp:listitem>
  30.           <asp:listitem>5 Stars</asp:listitem>
  31.         </asp:DropDownList>
  32.       </td>
  33.     </tr>
  34.   </ItemTemplate>
  35.   <FooterTemplate>
  36.     </table>
  37.   </FooterTemplate>
  38. </asp:Repeater>
Jun 17 '11 #1
1 1990
Frinavale
9,735 Recognized Expert Moderator Expert
Could you post the code for the SelectedIndexChanged event?

-Frinny
Jun 23 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1953
by: Vijay Kerji | last post by:
Hi, I have a datagrid with dropdown list and Remove hyperlink in it as columns. When I remove a row from the datagrid, Dropdown list selection is retaining its previous value. i.e, removed...
0
1575
by: ba | last post by:
I'm using asp.net 2.0 and am writing a webform using the formview control. The <%# Bind("") %> syntax makes sense for textboxes, but I cannot figure out how to bind a dropdown list to a column....
1
6482
by: sck10 | last post by:
Hello, I am using the following in a GridView. Currently, I am using a dropdown that pulls the Name of the person, given the Employee ID. I am doing this in both the ItemTemplate and the...
12
3501
deephill
by: deephill | last post by:
hi i need form dependency. Can u check below code? <p>1. Are you married?</p> <p>
2
1058
by: Bob | last post by:
is there a way to have a dropdown box and when the user clicks on an item in the dropdown box it can show information about that item in html somewhere else on the page example: in the drop down...
0
933
by: lyealain | last post by:
hi.. imagine i have 10 columns and plenty rows of data... i would like to have 2 dropdown box where the first one contains all the 10 column titles.. and the second dropdown contains each of the...
4
1271
by: mathewgk80 | last post by:
Hi everybody, I am having a drop down list with items 1,2,3.. and another dropdown list with items apple,orange and lemon.. If i select item 2 in the first dropdown list i need to get orange as...
2
1427
by: JJ297 | last post by:
I have a dropdown list populated via a database. I edited the dropdown list to have "select a topic" to always appear when the drop down loads. Now if a user selects a dropdown item it goes into...
20
3868
by: daitasri | last post by:
Hi I am using HTML and JS only. When i click on Button(say Add) a new row will be added in to the table with dropdown's and textboxes.I want to know how to access the data entered in the...
1
1430
by: mldardy | last post by:
I really hope this makes sense to someone because I really need some assistance with this: I have a asp page that I am working on that has as many as 4 dropdownlists depending on what I choose in...
0
7123
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
7326
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
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
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,...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
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
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
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
766
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.