User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 428,371 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,506 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 301 | Replies: 1
Reply
Join Date: May 2008
Posts: 47
Reputation: pranav_jog is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
pranav_jog pranav_jog is offline Offline
Light Poster

combobox

  #1  
May 30th, 2008
how to enter value in combo box after selecting values in asp.net
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Location: Chennai
Posts: 41
Reputation: rajarajan07 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
rajarajan07's Avatar
rajarajan07 rajarajan07 is offline Offline
Light Poster

Re: combobox

  #2  
Jun 1st, 2008
Place one dropdownlistbox and dont forget to give "autopostback=true". A button to set value and a label to show the value. Write the coding as below


protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack=False then
           ddltest.Items.Add(New ListItem("Plz Select"))
            ddltest.Items.Add(New ListItem("One"))
            ddltest.Items.Add(New ListItem("two"))
            ddltest.SelectedIndex = 0
End if
Protected Sub ddltest_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddltest.SelectedIndexChanged
        lbltest1.Text = ddltest.SelectedValue
End Sub
Protected Sub btntest1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btntest1.Click
        ddltest.SelectedItem.Value = Val(ddltest.SelectedItem.Value) + 10
End Sub

You can set the value to combo box items like this... If you got it, plz add to my reputation and mark it as solved.
If you got your answer, please mark the thread as Solved.
Thanks & Regards,
RajaRajan. R

rajarajan07@rediffmail.com
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC