LJnel Posted May 24, 2006 Share Posted May 24, 2006 heloi want to select item/values in a dropdownbox and with an "Add" button add the items to a list.... is this the best way of doing this or are there easier/better ways??thx Link to comment Share on other sites More sharing options...
aspnetguy Posted May 24, 2006 Share Posted May 24, 2006 I have seen that done before...it works well Link to comment Share on other sites More sharing options...
LJnel Posted May 24, 2006 Author Share Posted May 24, 2006 I have seen that done before...it works well<{POST_SNAPBACK}> hican you perhaps show me example websites or just examples, or explain how i can do it plz, i am a beginner still not a pro..thx Link to comment Share on other sites More sharing options...
pulpfiction Posted May 24, 2006 Share Posted May 24, 2006 page.aspx:<body> <form runat=server> <asp:DropDownList ID="ddl" Runat=server> <asp:ListItem Value="1">value1</asp:ListItem> <asp:ListItem Value="2">value2</asp:ListItem> <asp:ListItem Value="3">value3</asp:ListItem> <asp:ListItem Value="4">value4</asp:ListItem> <asp:ListItem Value="5">value5</asp:ListItem> <asp:ListItem Value="6">value6</asp:ListItem> </asp:DropDownList> <br /><br /> <asp:Button ID="btn" Runat=server Text="Submit"></asp:Button> <br /><br /> <asp:ListBox ID="lb" Runat=server Width="100"></asp:ListBox> </form> </body>page.aspx.vb:Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click lb.Items.Add(ddl.SelectedItem.Text) End Sub This is just a very basic code, what this does is when you select a value in the dropdownlist and click submit the value is added in the listbox Link to comment Share on other sites More sharing options...
LJnel Posted May 24, 2006 Author Share Posted May 24, 2006 thank you VERY much, ill try it and come back to ui have this project that my lecturer wants, i am on my own and new to asp.netand the project is a web app that the whole department wants to use, i amscared that i will not get it done in time.. so i will come here alot..i live in south africa, do u live here as well?thx louis Link to comment Share on other sites More sharing options...
aspnetguy Posted May 24, 2006 Share Posted May 24, 2006 Yes feel free to come here often with questions. I have been using ASP.Net for over 2 years now and love it. It is more efficient, faster, and cleaner than ASP and PHP.BTW, I live in Canada...a bit of a stroll (and a swim) from you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now