Solved

How to get HTML ID and value in C# codefile

Posted on 2006-07-22
1
1,565 Views
Last Modified: 2012-05-05
How to get the value of what I have selected in this HTML

<select name="sel_mysel" id="sel_mysel">
<option value="1">Sel1</option>
<option value="2">Sel2</option>
<option value="3">Sel3</option>
</select>

in my c# codefile.... I and using asp.net 2.x



I don't want to use the
<asp:DropDownList ID="DropDownList1" runat="server">
    </asp:DropDownList>
Then I know how to do it
0
Comment
Question by:m-jansen
[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
1 Comment
 
LVL 9

Accepted Solution

by:
jonorossi earned 50 total points
ID: 17160675
If you put a runat="server" on the select element node you can use it like a server control:
<select name="sel_mysel" id="sel_mysel" runat="server">

Example Codebehind:
        if (IsPostBack)
        {
            Response.Write(sel_mysel.Value);
        }
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

628 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