Exposing SelectedItem property of the dropdownlist in a user control

Posted by Shivamthinks under ASP.NET on 6/19/2012 | Points: 10 | Views : 1613 | Status : [Member] | Replies : 1
public object SelectedItem
{

get;
set;
}

How do i expose SelectedItem property of dropdown list so that it should act as the property of the dropdown lisy ?
What should i write in get and set ?
Please reply.

Thanks.




Responses

Posted by: Jpchoudhari on: 6/19/2012 [Member] Starter | Points: 25

Up
0
Down
use this

 public ListItem SelectedItem

{
get { return DropDownList1.SelectedItem; }
}


Kind Regards,
Jay

Shivamthinks, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response