ASP.NET - dropdownlist without postback asp net

Asked By Bhawana on 29-Jun-12 06:42 AM
Lalit M replied to Bhawana on 29-Jun-12 06:46 AM
Using javascript you can do this :
Jitendra Faye replied to Bhawana on 29-Jun-12 08:24 AM
Use this code-

.aspx code-

      function show() {
        var drp = document.getElementById('<%=DropDownList3.ClientID%>');
        document.getElementById('<%=Label1.ClientID%>').innerHTML = drp.value;
        return false;

  <asp:DropDownList ID="DropDownList3" runat="server">
      <asp:Label ID="Label1" runat="server"></asp:Label>

.cs code-

protected void Page_Load(object sender, EventArgs e)
      DropDownList3.Attributes.Add("onchange", "return show();");  

Try this and let me know.
RAJASEKHAR RAJENDRAN replied to Bhawana on 29-Jun-12 08:55 AM

You can achieve this using the Cascading Drop Down Concept i hope. Verify the link below to where you can get the example what can be achieved.  Thanks & Regards, Rajasekhar.R
Super Man replied to Bhawana on 29-Jun-12 02:22 PM
you can set AutoPostBack property to false.

or you can make use  <Select> <option>...</option> </select > Tags.