Solved

asp.net, drop down

Posted on 2014-02-27
1
249 Views
Last Modified: 2014-03-14
how can I make the drop down using get method in code behind?

like i have a asp.net dropdown and when someone select something inside, it will use get method and show on url like default.aspx?id=selectedvalue

by the way, I also use ajax toolkit with update panel.
0
Comment
Question by:CoolDev2014
1 Comment
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39895012
you could just add an onchange attribute to the dropdown and set the url there:

<asp:DropDownList ID="ddl" runat="server"
  onchange="document.location.href = 'default.asp?id=this.value;" >
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now