how to get html 'form' values on the server

Posted on 2007-09-28
Last Modified: 2012-05-05
How can i get the html control values in function. or in querystring.......?
i have the following page:
<%@ Page Language="VB" Debug="True" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Net.WebRequest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

<script language="javascript" src="datePicker.js"></script>
<script type='text/javascript' src='groups-searchform.js'></script>
<script type='text/javascript' src='packages.js'></script>

<script language="vb" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim arg As String = Request.Form("__EVENTTARGET")
    Dim val As String = Request.Form("__EVENTARGUMENT")
    If (arg = "CHK") Then
    End If
End Sub

Public Function CheckAvailibility() As Boolean
End Function
<body onLoad="initdropdown();initdropdown1();">
<form name="frm" action="mygroup.aspx" method="post">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
            <select name="gateway_dep" onchange="refreshDest()">
            <select name="dest_dep" onchange="destchanged()">
                  <select name="no_hotel">
            <select name="departure_month">
          <option value="01">January</option>
          <option value="02">February</option>
          <option value="03">March</option>
          <option value="04">April</option>
          <option value="05">May</option>
          <option value="06">June</option>
          <option value="07">July</option>
          <option value="08">August</option>
          <option value="09">September</option>
          <option value="10">October</option>
          <option value="11">November</option>
          <option value="12">December</option>
            <select name="departure_day" onchange="javascript:__doPostBack('CHK','');">
            <option value="01">1</option>
            <option value="02">2</option>
            <option value="03">3</option>
            <option value="04">4</option>
            <option value="05">5</option>
            <option value="06">6</option>
            <option value="07">7</option>
            <option value="08">8</option>
            <option value="09">9</option>
            <option value="10">10</option>
            <option value="11">11</option>
            <option value="12">12</option>
            <option value="13">13</option>
            <option value="14">14</option>
            <option value="15">15</option>
            <option value="16">16</option>
            <option value="17">17</option>
            <option value="18">18</option>
            <option value="19">19</option>
            <option value="20">20</option>
            <option value="21">21</option>
            <option value="22">22</option>
            <option value="23">23</option>
            <option value="24">24</option>
            <option value="25">25</option>
            <option value="26">26</option>
            <option value="27">27</option>
            <option value="28">28</option>
            <option value="29">29</option>
            <option value="30">30</option>
            <option value="31">31</option>
<form id="Form1" method="post" runat="server">
<asp:TextBox id="txtMessage" runat="server" TextMode="MultiLine" AutoPostBack="True" Width="500px" Height="250px"></asp:TextBox>

please help me in finding out the way how can i get the selected item text in function. Most of the select box here gets populated using client side javascript and my restriction is i cant make my form runat=server. If i did that then none of the select box gets populated. So all i need to do is to get the selected item text or values on the server side.
I can accept anything as a solution that gives me html select control's selected item text or values on server side. Either use session, server side javascript etc....just make sure that im using using  
Question by:shwaqar82
    LVL 10

    Accepted Solution

    Give an id to the dropdown, runat=server and then call the selected value on the server side.

    Something like this:

    <select id="dept" runat="serve" name="departure_day" onchange="javascript:__doPostBack('CHK','');">

    In Code-behind:

    LVL 10

    Expert Comment

    Sorry. Like this:

    <form name="frm" action="mygroup.aspx" method="post" runat=server id=dept>

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now