?
Solved

get the values from the DropDownList(S) in C# codebehind from the tables

Posted on 2007-04-02
2
Medium Priority
?
218 Views
Last Modified: 2013-11-27
EASY QUESTION...i am using ASP.NET/C#

My question is how do i get the values from the DropDownList(S) in C# codebehind from the tables?

Below is a snip of code:

 <table style="width: 323px; border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; border-bottom: black 1px solid;">
            <tr>
                <td colspan="3">
                    <span style="font-size: 10pt">Close Calendar Schedule Reminders</span></td>
            </tr>
            <tr>
                <td style="width: 1px; height: 24px;">
                    <asp:DropDownList ID="DropDownList1" runat="server">
                    </asp:DropDownList></td>
                <td style="width: 31px; height: 24px">
                    <asp:DropDownList ID="DropDownList2" runat="server">
                    </asp:DropDownList></td>
                <td style="height: 24px;">
                    <asp:LinkButton ID="LinkButton1" runat="server" Font-Size="10pt">Insert</asp:LinkButton></td>
            </tr>


0
Comment
Question by:joan2006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Expert Comment

by:emailrobertwalker
ID: 18838863
You used the word "from" twice in your question, so it is dificult to understand what you need the data from.

Can you restate it?
0
 
LVL 12

Accepted Solution

by:
ShazbotOK earned 2000 total points
ID: 18838952
I am going to assume you have populated the DisplayText AND the DisplayValue with a datasource so here you go:
//when user selects the dropdown and a postback event occurs...
         string selectedVal1 = DropDownList1.SelectedValue;
         string selectedVal2 = DropDownList2.SelectedValue;
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question