You must Sign In to post a response.
  • Category: .NET

    Get UserControl Dropdown values

    hi friends,

    i have a one dropdownlist in usercontrol and when i select a button after select usercontrol dropdownlist , dropdown values pass to another aspx normal pages but it does not pass selected values always send to selected item shows "-- Choose Type --"

    In Usercontrol ,dropdown

    <asp:DropDownList ID="ddlType" runat="server" Width="165px" Font-Bold="False"
    Enabled="true" Height="16px" onchange="javascript:return EnableType();"
    <asp:ListItem Value="CIT">-- Choose Type --</asp:ListItem>
    <asp:ListItem Value="A">Add</asp:ListItem>
    <asp:ListItem Value="S">SUB</asp:ListItem>

    please help me
  • #767140

    How do you pass selected Value of dropdown to pages, are you passed using Session or how?

    If you are passed using Session then check the session value, if it is default value then for every time pass the values to pages first clear the session and then pass.

    We need code base to understand better..

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #767142
    Hi Emmi.

    You need to store the selected value in session in page one and after sending to other page(second page) you should retrieve that selected value from the session which you have already saved in first page.
    And what you have written in the javascript function

    Sridhar Thota.
    Editor: DNS Forum.

  • #767179
    Try to use this on aspx page:
    1. Javascript:
    alert(document.forms[0]['UserControlId:DropDownId'].value )
    2. Use of Properties:
    crete Get{}Set{} property and set value of dropdown on its change.

  • Sign In to post your comments