I am working on a single page application with 4 dropdown. Once first dropdown is selected, then only 2nd will be activated. And once 2nd then 3rd and so on.. So, Suppose my url is xyz.com and I selected first dropdown value 'abc' then my website url should
redirect to xyz.com/abc/ and then since second drop down is getting activated so once I select second dropdown say 123 then it should redirect the url to xyz.com/abc/123/
Order is fixed. we can not select 123 without selecting abc.
The problem is we are not able to add the values in URL.
Look at the AjaxControlToolkit, they have a cascading dropdown list. as for changing the url. I don't think you can do that without redirecting someone to a new url, which I don't understand why you would want to do that.
I don't understand why after you help someone, they don't mark your post as the answer. What's up with that???
This web portal is written in PHP and I am looking to make a similar one in asp.net. Select the drop down and it will change the URL. Coding part is already done. Just I am stuck at URL part.
So, please suggest how to do .
Again I would like to remind u that I have created only one page application.
Use query strings instead to pass your dropdown values. In asp.net you cannot achieve the same type of functionality as the websited which you have posted.
Please click "Mark as Answer" if you think this post answer your question
bhoopendra.s...
0 Points
7 Posts
Display dropdown selected item in URL.
Oct 10, 2012 03:42 PM|LINK
It may be already answered, sorry for it.
I am working on a single page application with 4 dropdown. Once first dropdown is selected, then only 2nd will be activated. And once 2nd then 3rd and so on.. So, Suppose my url is xyz.com and I selected first dropdown value 'abc' then my website url should redirect to xyz.com/abc/ and then since second drop down is getting activated so once I select second dropdown say 123 then it should redirect the url to xyz.com/abc/123/
Order is fixed. we can not select 123 without selecting abc.
The problem is we are not able to add the values in URL.
Thanks.
javedwahid
Participant
1686 Points
469 Posts
Re: Display dropdown selected item in URL.
Oct 10, 2012 04:27 PM|LINK
Look at the AjaxControlToolkit, they have a cascading dropdown list. as for changing the url. I don't think you can do that without redirecting someone to a new url, which I don't understand why you would want to do that.
bhoopendra.s...
0 Points
7 Posts
Re: Display dropdown selected item in URL.
Oct 11, 2012 06:18 AM|LINK
Please take this example http://ifsccode.in
This web portal is written in PHP and I am looking to make a similar one in asp.net. Select the drop down and it will change the URL. Coding part is already done. Just I am stuck at URL part.
So, please suggest how to do .
Again I would like to remind u that I have created only one page application.
Thanks.
sureshkumar....
Contributor
2143 Points
504 Posts
Re: Display dropdown selected item in URL.
Oct 11, 2012 07:06 AM|LINK
All your dropdowns code is in single page or multiple pages?
Best Regards,
Suresh Kumar Gundala
sureshkumar....
Contributor
2143 Points
504 Posts
Re: Display dropdown selected item in URL.
Oct 11, 2012 07:11 AM|LINK
I have checked the website which you have posted. I don't think that is possible in asp.net.
You can use query string insted and pass your dropdown values as query string parameters if you want to show the
dropdown values in URL
Best Regards,
Suresh Kumar Gundala
bhoopendra.s...
0 Points
7 Posts
Re: Display dropdown selected item in URL.
Oct 11, 2012 07:13 AM|LINK
yes, All dropdowns code is in single page only.
sureshkumar....
Contributor
2143 Points
504 Posts
Re: Display dropdown selected item in URL.
Oct 11, 2012 08:41 AM|LINK
Use query strings instead to pass your dropdown values. In asp.net you cannot achieve the same type of functionality as the websited which you have posted.
Best Regards,
Suresh Kumar Gundala
bhoopendra.s...
0 Points
7 Posts
Re: Display dropdown selected item in URL.
Oct 11, 2012 11:42 AM|LINK
I have solved this Issue using query string.
thanks for ur guidance.
javedwahid
Participant
1686 Points
469 Posts
Re: Display dropdown selected item in URL.
Oct 11, 2012 03:38 PM|LINK
The page that you posted is reloading the page every time you change the dropdown.
You can achieve this with the url structure, by using url rewriting to get the values from the url and auto populate the dropdowns on Page_Load.