About your post ,for you didn’t post your error message.
Accodring to your code ,it seems that when you want to change item on DropDownList1 ,then DropDownList2 and DropDownList3 will bind data.
If your problem is that when you click the item in your DropDownList1,But nothing change on your other DropDownLists.
Please try to set AutoPostBack=”true” ,just like below:
None
0 Points
5 Posts
DropDownList_SelectedIndexChange Error - Please help!
Apr 19, 2014 07:36 PM|albasel|LINK
Greeting for all,
When I run the below code by VB 2013, it returns me back to
I don't know what is going on
CAN ANY BODY HELP ME TO SOLVE THAT ASAP?
Thanks in advance.
My Code is the following:
oledbconnection
All-Star
16806 Points
2777 Posts
Microsoft
Re: DropDownList_SelectedIndexChange Error - Please help!
Apr 20, 2014 10:24 PM|Kevin Shen - MSFT|LINK
Hi albasel,
About your post ,for you didn’t post your error message.
Accodring to your code ,it seems that when you want to change item on DropDownList1 ,then DropDownList2 and DropDownList3 will bind data.
If your problem is that when you click the item in your DropDownList1,But nothing change on your other DropDownLists.
Please try to set AutoPostBack=”true” ,just like below:
If I misunderstand your problem,please give me your exact error message ,so that I can recreate in my computer.
Hope it can help you.
Best Regards,
Kevin Shen.
oledbconnection
None
0 Points
5 Posts
Re: DropDownList_SelectedIndexChange Error - Please help!
Apr 20, 2014 11:07 PM|albasel|LINK
I have already set AutoPostBack=”true”
It doesn' t show me any message only once I choose from dropdownlist1 it return me back to visual studio and highlighting the first bracket of
oledbconnection
All-Star
16806 Points
2777 Posts
Microsoft
Re: DropDownList_SelectedIndexChange Error - Please help!
Apr 21, 2014 02:28 AM|Kevin Shen - MSFT|LINK
Hi albasel,
please set a breakpoint on your method DropDownList1_SelecteIndexChanged() ,and see the press F11 to debug your application,
if it has error,please provide your error message for me, for i write a sample just like you but it works very well.
Here is my page code:
Here is my server code:
Hope it can help you.
Best Regards,
Kevin Shen.
oledbconnection
None
0 Points
5 Posts
Re: DropDownList_SelectedIndexChange Error - Please help!
Apr 22, 2014 04:43 PM|albasel|LINK
I have set a breakpoint at my method DropDownList2_SelecteIndexChange() and I have found that the error in
I think the error because Car_Year is a number and this parameter should be string
So, how can I assign a number field to that.
THANKS
oledbconnection
All-Star
25756 Points
7014 Posts
Re: DropDownList_SelectedIndexChange Error - Please help!
Apr 22, 2014 05:18 PM|hans_v|LINK
DropDownList3.DataSource = cmd.ExecuteReader();
DropDownList3.DataTextField = "Car_Year";
DropDownList3.DataValueField = "Module_ID";
DropDownList3.DataBind();
oledbconnection
All-Star
25756 Points
7014 Posts
Re: DropDownList_SelectedIndexChange Error - Please help!
Apr 22, 2014 05:24 PM|hans_v|LINK
This is wrong also! Model_ID isn't a fieldname in the command!
Also, take a look at this:
http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/CascadingDropDown/CascadingDropDown.aspx
oledbconnection