C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







how will i capture the value of the selected item from dropdown list in VB.NET with C#


Posted Date: 13 May 2008      Total Responses: 5

Posted By: kugan.t       Member Level: Gold     Points: 1


how will i capture value of the selected item from dropdown list in VB.NET with C# code

if i select the first item , i want to pass the selected item value in textbox or label

what is the coding?





Responses

Author: shakti singh tanwar    13 May 2008Member Level: DiamondRating:     Points: 2
Use dropDownListName.SelectedItem or dropDownListName.Items(dropDownListName.SelectedIndex)


Author: Shivshanker Cheral    13 May 2008Member Level: DiamondRating:     Points: 2
set drop down lists autopostback to true

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = DropDownList1.SelectedItem.ToString();// item
Label1.Text = DropDownList1.SelectedValue.ToString(); //value
}



Author: uday mahajan    13 May 2008Member Level: SilverRating:     Points: 2
IF you want selected item value ie Primary Key
TextBox1.Text = DropDownList1.SelectedValue.ToString();


Author: Dharmaraj    13 May 2008Member Level: DiamondRating:     Points: 2
Hi,

TextBox1.Text = dropDownlist1.SelectedValue.ToString();



Author: karthekeyan    13 May 2008Member Level: DiamondRating:     Points: 2
selecteditem.tostring
selectedvalue.tostring


Post Reply
You must Sign In to post a response.
Next : url mapping
Previous : help me..............urgently for mail
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



Read TATA Nano reviews.
dotNet Slackers   BizTalk Adaptors    Web Design   Scripts
Are you waiting for engineering entrance result? Watch here for engineering entrance results.
conference calls

Contact Us    Privacy Policy    Terms Of Use