R
Rabbit
Hi, All,
I have a FormView, in which the InsertItemTemplate has a dropdownlist that I
need to set the datasource as my self created dataset.
I have been trying various syntax like following at formview Init or
ItemCreated event:
Dim cbo As DropDownList =
CType(Me.fmViewUser.Row.Cells(0).FindControl("ddNameInsert"), DropDownList)
or
Dim cbo As DropDownList =
CType(Me.fmViewUser.Row.FindControl("ddNameInsert"), DropDownList)
But I still can access such dropdownlist, and keeps prompting "Object
reference not set to an instance of object".
Has anyone got idea how to fix it? or telling me how to set a control inside
a formView Control?
Thanks in advnace
Keith
I have a FormView, in which the InsertItemTemplate has a dropdownlist that I
need to set the datasource as my self created dataset.
I have been trying various syntax like following at formview Init or
ItemCreated event:
Dim cbo As DropDownList =
CType(Me.fmViewUser.Row.Cells(0).FindControl("ddNameInsert"), DropDownList)
or
Dim cbo As DropDownList =
CType(Me.fmViewUser.Row.FindControl("ddNameInsert"), DropDownList)
But I still can access such dropdownlist, and keeps prompting "Object
reference not set to an instance of object".
Has anyone got idea how to fix it? or telling me how to set a control inside
a formView Control?
Thanks in advnace
Keith