Thanks for the help. I found response.redirect(url) which does what I want it to as well.
I ask these questions because I don't know ASP at all, and I'm learning ASP.NET. Matthew Small IT Supervisor Showstopper National Dance Competitions 3660 Old Kings Hwy Murrells Inlet, SC 29576 843-357-1847 http://www.showstopperonline.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 11:05 AM To: dotnet Subject: Re: Should be easy - ASP.NET Web Forms and jumping to another page >How can I jump to another page from within a .NET ASP page? I have a >drop down list that, when changed, causes my application to jump to a >different page. You can do it exactly like you would in ASP: <select onchange="goto(this);"> <option value="http://www.yahoo.com">Yahoo</option> <option value="http://www.msn.com">MSN</option> </select> <script type="text/javascript"> function goto(sel) { document.location.href = sel.options[sel.selectedIndex].value; } </script> So if you're using a DropDownList and databinding, you could do this: <asp:DropDownList id="myddl" runat="server"></asp:DropDownList> ... myddl.DataSource = //whatever myddl.DataBind(); myddl.Attributes.Add("onchange", "goto(this);"); Or if you don't want to do it the client-side way, you can have your select box auto post back and you can handle the event: <asp:DropDownList id="myddl" AutoPostBack="True"></asp:DropDownList> ... (event handler for SelectedIndexChanged) public void myddl_SelectedIndexChanged(object sender, EventArgs e) { Response.Redirect( myddl.SelectedItem.Value ); } HTH, adam.. --- You are currently subscribed to dotnet as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/ --- You are currently subscribed to dotnet as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/
