p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   Page Linking though DropDown Lists (http://p2p.wrox.com/showthread.php?t=12185)

mahulda April 23rd, 2004 03:51 AM

Page Linking though DropDown Lists
 
Among Other Controls MyPage also contains a SropDown List and
a Hyperlink.
When A user Slects an item from the list and Clicks the Hyprlink, a
new Page is displayed.
What i want is to display the new page as soon as the user selects an item from the DropDownlist.

In the Home Page of this Forum there is a DropDownlist at the Bottom Right of the Page

                        Jump to Forum
As soon as I select an item from the List the new page gets
displayed.
This is what I want with my Page

If the solution to my problem is Posting to new Page using Forms
then please advise me some help links on that topic


planoie April 23rd, 2004 11:07 AM

All you need to do is turn set AutoPostback to "True" on the dropdownlist control. This will make the Html <select> control fire the form post when it's "onChange" client event is called. Just the same way as the "Jump To:" selector on this site works. However, ASP.Net handles creating the javascript for you. You need only set that attribute to turn it on.

<asp:dropdownlist Runat="server" ID="dropdownlist1" AutoPostBack="True" />

Peter
-------------------------
Work smarter, not harder

bmains April 23rd, 2004 02:58 PM

You can then catch the change on the server side via the SelectedIndexChanged event.


All times are GMT -4. The time now is 02:36 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.