Tuesday, April 10, 2012

How to get Value from DropDownList inside a ListView?

I have a DropDownList inside in ListView..
I wanted to get a data when command clicked.
this is my code..



protected void ListView2_ItemCommand(object sender, ListViewCommandEventArgs e){

string shipmethod = ((DropDownList)e.Item.FindControl("ShippingComapnyDDL")).SelectedValue;

}


but it always return null value..
I've googling about 3 hours, and try many function..
but still cant solve this bug..



please help me guys,





No comments:

Post a Comment