How would I assign a SelectedValue to a DropDownList control within the Page_Load event?... I have tried the following line but doesn't seem to like it..
Dim DDL As DropDownList = FormView1.FindControl("DDLProfile")
DDL.SelectedValue = "1"
The dropdownlist is static as in it isn't bound to a DB table.
The error I get from this is the following:
quote:Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.