Help needed(getting the html drop down list value in c# servercode)

Discussion in 'ASP .Net Web Controls' started by Raghu Raman, Jan 24, 2005.

  1. Raghu Raman

    Raghu Raman Guest

    hi,

    in my aspx page ,i am creating a html select(dropdown list) in runtime
    and assigning the datasource to it.The control is displayed nice.the
    control is created in the Infragistics Grid cell*


    But i need to get the value selected from this html drop down list also
    thru my server side event.

    Herewith i 've given the code snippet for your glance.

    ''----------------------------------------------------------------------
    -----
    Application[Appsid] = "";
    while(dr1.Read())
    {

    Application[Appsid] = Application[Appsid] +
    "<option Value=''" + dr1[0] + "''>" +
    dr1[1] + "</option>";
    //Coltype="<asp:dropdownlist ID='lstSelItem' visible='true'
    height=100px DataTextField=''" + dr1[0] + " DataValueField=''" + dr1[1]
    + " pkgID width =150px runat='server'></asp:dropdownlist>";
    }
    Coltype="<Select name='" + Appsid + "' ID='" + Appsid + "'
    OnServerChange='drbchanged_ServerChanged' runat='server' style='WIDTH:
    100px; HEIGHT: 32px top=14'> " + Application[Appsid] + " </select>";
    //Coltype="<Select ID='" + Appsid + "' runat='server' onblur='var
    h=document.getElementById('Hdc'); h=document.forms[0]." + Appsid +
    ".options[document.forms[0]." + Appsid +
    ".selectedIndex].text;style='WIDTH: 100px; HEIGHT: 32px top=14'> " +
    Application[Appsid] + " </select>";


    ug.Rows.Cells[Col].Text=Coltype;
    ''----------------------------------------------------------------------
    ------




    Regards
    Raghu

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Raghu Raman, Jan 24, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    745
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,002
    weiwei
    Jan 5, 2007
  3. Replies:
    3
    Views:
    549
  4. msimmons
    Replies:
    0
    Views:
    460
    msimmons
    Jul 16, 2009
  5. Replies:
    5
    Views:
    254
Loading...

Share This Page