Say I have the following code:
DropDownList changesList = new DropDownList();
ListItem item;
item = new ListItem();
item.Text = "go to google.com";
changesList.Items.Add(item);
How do you dynamically add an OnClick event to item so that google.com will be visited after clicking on the item?
Add this to your code: