tags:

views:

45

answers:

1

Hi All

I have a little problem. How can I select value with value id?

this is my code:

string actionId = new MyRptSubReportEntity().GetReportAction(this.SubReportId).ToString();
if (actionId == "0") actionId = "4";
// this.drpActionList.SelectedIndex =int.Parse(actionId);
this.drpActionList.SelectedValue = actionId;

but it is not working. Actionid is coming from the database.

Thanks for your answers. John

+1  A: 
dropdown.SelectedValue = value;

linky

tster
this is my code string actionId = new MyRptSubReportEntity().GetReportAction(this.SubReportId).ToString(); if (actionId == "0") actionId = "4"; // this.drpActionList.SelectedIndex =int.Parse(actionId); this.drpActionList.SelectedValue = actionId; but it is not working. actionid is coming database.
John