H
hina.pandya
I m getting this error "Object reference not set to an instance of an
object." when i run my application.
i m trying to select a value from dropdownlist
here is the code.
Protected Sub GetMsg(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles dgJobQueue.PreRender
ASPNET_MsgBox("welcome to msgbox")
dgJobQueue.FindControl("cboUserID")
Dim cboUserIdTemp As DropDownList =
CType(dgJobQueue.FindControl("cboUserID"), DropDownList)
Dim s As String = GetUserName()
Dim listItem As ListItem
cboUserIdTemp.SelectedValue = s
End Sub
object." when i run my application.
i m trying to select a value from dropdownlist
here is the code.
Protected Sub GetMsg(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles dgJobQueue.PreRender
ASPNET_MsgBox("welcome to msgbox")
dgJobQueue.FindControl("cboUserID")
Dim cboUserIdTemp As DropDownList =
CType(dgJobQueue.FindControl("cboUserID"), DropDownList)
Dim s As String = GetUserName()
Dim listItem As ListItem
cboUserIdTemp.SelectedValue = s
End Sub