I have 2 textboxes, a dropdownlist and a button in the EmptyDataTemplate of a GridView control and when I click the button I want to get the text from the text boxes and DropDownList put it in the QueryString of a URL i redirect to, but I can't work out why the FindControl method cannot find the controls. I am using the following code:
Dim ddlNumPpl As DropDownList = GridView1.FindControl("ddlNumPpl")
I get an "Object reference not set to an instance of an object" error though when I try to refer to the SelectedValue property of it though. I would be very grateful if someone could let me know why the FindControl method can't find the control and what I should do to rectify it.
Many Thanks (in advance),
View Complete Post