Category Name: | AutoPostBack="true" Width="146px" ontextchanged="DropDownList1_TextChanged"> |
SubCategory Name: | onselectedindexchanged="DropDownList2_SelectedIndexChanged" ontextchanged="DropDownList2_TextChanged"> |
Level Name: /td> |
Loading
Category Name: | AutoPostBack="true" Width="146px" ontextchanged="DropDownList1_TextChanged"> |
SubCategory Name: | onselectedindexchanged="DropDownList2_SelectedIndexChanged" ontextchanged="DropDownList2_TextChanged"> |
Level Name: /td> |
Bhushan BhureRank #5,034 · 314 reputationPosted Aug 9, 2012, 6:56 AM EDT
You are getting object refrence error on this line
DropDownList2.SelectedItem.Text= sn;
because, you don't have any items populated in DropDownlist2 and you are trying to set selectedItem.
Make sure you populate DropDown2 before.
click "accept answer" if this resolves your problem
Bhushan BhureRank #5,034 · 314 reputationPosted Aug 8, 2012, 5:58 AM EDT
It will be good, if you post your complete code with question (or attach as zip).
amaan ahmed3 reputationPosted Aug 8, 2012, 9:14 PM EDT
Neha Rana132 reputationPosted Mar 19, 2016, 2:48 AM EDT