Capturing the dropdownlist value in a datagrid

Hi,

I have a dropdownlist with 2 buttons (search, update).  When the update is clicked, I want to get the value or text in the dropdownlist and add it to a db.

I'm using a normal click event for the update button, b/c of how I want the search/update buttons to display in grid.  Can someone help?  Maybe provide a snippet of code as an example?

Here is the edit template part of the grid................

<EditItemTemplate>

<TABLE Width="100%" CellPadding="0" CellSpacing="0" Border="0" >

<TR>


<TD>


<asp:DropDownList id="ddlRC" runat="server" Width="115px" >

<asp:ListItem>Jodi MacLeod</asp:ListItem>

<asp:ListItem>Cyrus Hopkins</asp:ListItem>

<asp:ListItem>Andrew Karson</asp:ListItem>

<asp:ListItem>Brit Nicholson</asp:ListItem>

<asp:ListItem>Ishir Bhan</asp:ListItem>

<asp:ListItem>Robert Kraft</asp:ListItem>

</asp:DropDownList>


</TD>

</TR>

<TR>

<TD>

<asp:button

id="bSearch"

runat="Server"

text="Search"/>

<asp:button

id="bUpdate"

runat="Server"

OnClick="bUpdate_Click"/>

</TD>


</TR>

</TABLE>

</EditItemTemplate>
jm76Asked:
Who is Participating?
 
barretttCommented:
Heres a great article on datagrids with a section on dropdown lists:
http://www.codeguru.com/vb/vb_internet/database/article.php/c6363/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.