Click here to Skip to main content
16,005,080 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more: (untagged)
Ive been trying to find a way to access a drop down list value that is within the item template in a details view. This drop down list is conected to a database and i want to recover the value that is loaded when the page loads.

So can anyone help me with some clues on how to go about this??
Posted

1 solution

Do this:

DropDownList ddl = (DropDownList)dtv.Rows[index].FindControl("ddlTemplate");

ddl gets the reference to the dropdown in the item template, i.e ddlTemplate.

Let me know how it goes.
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900