enrique_aeo
asked on
dropdownlist : Object reference not set to an instance of an object.
I have a page where this dropdownlist is hidden ddlDepartamento
but elsewhere in the code asks for this combo as follows
If ddlDepartamento.SelectedIt em.Value.E quals("%") Then
therefore I have this error:
Object reference not set to an instance of an object.
as I can ask for a dropdownlist that is not visible in the html
but elsewhere in the code asks for this combo as follows
If ddlDepartamento.SelectedIt
therefore I have this error:
Object reference not set to an instance of an object.
as I can ask for a dropdownlist that is not visible in the html
What function/method are you calling If ddlDepartamento.SelectedIt em.Value.E quals("%") Then in?
Hi,
when you make control Visible="false" then it is not rendered in output, you can use css style hidden as
style="display:none"
Hope it will help
Thanks
when you make control Visible="false" then it is not rendered in output, you can use css style hidden as
style="display:none"
Hope it will help
Thanks
ASKER
kaufmed: is a code that is already done
IJZ: everything I do in the code behind
IJZ: everything I do in the code behind
then make sure that
ddlDepartamento.SelectedIt em!=null
or ddlDepartamento.SelectedIn dex>0
ddlDepartamento.SelectedIt
or ddlDepartamento.SelectedIn
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> kaufmed: is a code that is already done
I mean are you calling it in Form_Load, OnFormLoad, OnLoadComplete, etc.
I mean are you calling it in Form_Load, OnFormLoad, OnLoadComplete, etc.