T
TJS
need help with trying to set selected value on a droplist.
-- tried vCaptainID as integer and string , no luck
-- tried it in pre render and also after droplist is created , no luck
========= error ======================
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Source Error line 392 :
Line 390: vCaptainID =5 '<=test value which exists in droplist
Line 391: Dim ctrlCaptain as DropDownList =
Eventform.FindControl("IDCaptain")
Line 392: ctrlCaptain.SelectedIndex =
ctrlCaptain.Items.IndexOf(ctrlCaptain.Items.FindByValue(vCaptainID ))
-- tried vCaptainID as integer and string , no luck
-- tried it in pre render and also after droplist is created , no luck
========= error ======================
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Source Error line 392 :
Line 390: vCaptainID =5 '<=test value which exists in droplist
Line 391: Dim ctrlCaptain as DropDownList =
Eventform.FindControl("IDCaptain")
Line 392: ctrlCaptain.SelectedIndex =
ctrlCaptain.Items.IndexOf(ctrlCaptain.Items.FindByValue(vCaptainID ))