View Single Post
Join Date: Sep 2007
Posts: 72
Reputation: reach_yousuf is an unknown quantity at this point 
Solved Threads: 13
reach_yousuf reach_yousuf is online now Online
Junior Poster in Training

Re: listbox and selectedvalue urgent

 
0
  #3
Dec 2nd, 2008
hii

Add the code code in your .aspx

  1. <asp:DropDownList id="ddl1" runat="server" AutoPostBack="True" AppendDataBoundItems="True" >
  2. <asp:ListItem Selected="True" Value="-1">--Select Me--</asp:ListItem>
  3. <asp:ListItem Value="1">Value 1</asp:ListItem>
  4. <asp:ListItem Value="2">Value 2</asp:ListItem>
  5.  
  6. </asp:DropDownList>

And you can bind additional values at run time from database and can use selected

  1. Private Sub ddl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddl1.SelectedIndexChanged
  2.  
  3. your code
  4. End Sub

Mark as solved if it helps you!!!

Regards
Yousuf
Software Developer
Reply With Quote