I'm looking for the command to direct a user to a new URL.
For example, in ASP, when you created a dropdown box, the
item selected could open a file - using the form
action="MyFile. asp"
How do you do a similar thing in ASP.NET?? 6 1688
Have you tired:
Response.Redire ct("URL_of_page .aspx");
"Steve" <st************ *@threerivers.g ov.uk> wrote in message
news:0a******** *************** *****@phx.gbl.. . I'm looking for the command to direct a user to a new URL. For example, in ASP, when you created a dropdown box, the item selected could open a file - using the form action="MyFile. asp" How do you do a similar thing in ASP.NET??
use a client side form with an action thingie :)
its standard html so i don't see why that wouldn't work.
"Steve" <st************ *@threerivers.g ov.uk> wrote in message
news:0a******** *************** *****@phx.gbl.. . I'm looking for the command to direct a user to a new URL. For example, in ASP, when you created a dropdown box, the item selected could open a file - using the form action="MyFile. asp" How do you do a similar thing in ASP.NET??
Set the AutoPostBack property of the DropDownList to True, then wire an
event handler for the SelectedIndexCh anged event and in the event handler,
write Response.Redire ct( yourDropDownLis t.SelectedItem. Value, true );
assuming that the Value of the SelectedItem is the URL to redirect the user
to.
Mario
"Steve" <st************ *@threerivers.g ov.uk> wrote in message
news:0a******** *************** *****@phx.gbl.. . I'm looking for the command to direct a user to a new URL. For example, in ASP, when you created a dropdown box, the item selected could open a file - using the form action="MyFile. asp" How do you do a similar thing in ASP.NET??
Sorry, continued;
Class below - how can I call this array so that when the
strName "SomeMeetin g" is selected in the dropdown box
The user is taken to the strPage "SomeMeetingPag e.aspx"
?????
Structure MeetingInfo
Dim strName as string
Dim strPage as string
End Structure
Public Function GetMeetingList( ) as MeetingInfo
Dim arMeetings(11) as MeetingInfo
arMeetings(1).s trName = "SomeMeetin g"
arMeetings(1).s trPage = "SomeMeetingPag e.aspx"
etc etc
Return arMeetings
I agree with Steve, client side seems better for this. If you decide to go
that route I have a sample javascript for doing just this on my web site:
www. aboutfortunate. com
It's listed as: Open web page from drop down list
(Sorry, I haven't built in a search capability yet, but the library is still
small so it won't be difficult to find. I'll be adding a search soon
though.)
--
S. Justin Gengo, MCP
Web Developer / Programmer
Free Code Library At: www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Man, I see a whole lot of rather complex server-side solutions for this,
but I don't see a necessity for a server-side solution based upon your requirements at all. What you need is to create a drop-down list box that
is populated on the server side, but on the client side, each option simply
has a value of what page you want to redirect to, and a text of whatever you want. Add a JavaScript "onchange" client-side event handler that reads something like the following:
<select name="whatever" size="1" onchange="docum ent.href=this.o ptions[this.selectedIn dex].value"> ...
Remember that anything you can do on the client side is going to save you
a heck of a lot of load on the server side.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Big things are made up of lots of little things.
"Steve" <st************ *@threerivers.g ov.uk> wrote in message news:0a******** *************** *****@phx.gbl.. . I'm looking for the command to direct a user to a new URL. For example, in ASP, when you created a dropdown box, the item selected could open a file - using the form action="MyFile. asp" How do you do a similar thing in ASP.NET??
I also agree with you, even though I'm one of those who posted one of the
server-side solutions. I was thinking of also providing a client-side
solution, but oh, well, what's done is done...
Mario
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Man, I see a whole lot of rather complex server-side solutions for this,
but I don't see a necessity for a server-side solution based upon your requirements at all. What you need is to create a drop-down list box that
is populated on the server side, but on the client side, each option simply
has a value of what page you want to redirect to, and a text of whatever you want. Add a JavaScript "onchange" client-side event handler that reads something like the following:
<select name="whatever" size="1" onchange="docum ent.href=this.o ptions[this.selectedIn dex].value"> ...
Remember that anything you can do on the client side is going to save you
a heck of a lot of load on the server side.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Big things are made up of lots of little things.
"Steve" <st************ *@threerivers.g ov.uk> wrote in message news:0a******** *************** *****@phx.gbl.. . I'm looking for the command to direct a user to a new URL. For example, in ASP, when you created a dropdown box, the item selected could open a file - using the form action="MyFile. asp" How do you do a similar thing in ASP.NET??
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: rhat |
last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant.
Can anyone shed some light on what this will change and it will break stuff
as converting HTML to XHTML pages DO break things. see,
http://www.alistapart.com/articles/betterliving/
I read on
http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/netfxcompat.asp
It said they changed stuff like this
|
by: raz |
last post by:
Greetings all.
I apologize for what is almost certainly a stupid question, but I
can't figure this out, and have no more time for head bashing...
The short version: what is the appropriate include file to define the
CString type in an MFC based app?
The longer version:
|
by: IS |
last post by:
At the recommendation of several people in this newsgroup I have downloaded
two or three Compilers. One is the Beta version of Microsoft's Visual C++
2005.
I have entered a complete beginner code that looks like this:
#include <iostream>
using namespace std: //introduces namespace std
int main( void )
|
by: Ron Weldy |
last post by:
I read that you don't need .cs files to deploy but I suppose if you are
trying to reconstruct someone's work, you will need these files. Is that
correct?
|
by: rroman |
last post by:
I have a very simple form, takes information from the user, updates a SQL
database, now I just want to redirect to a "Thank You For Your Time" web page
within the same bowser. ASP. NET VB
| |
by: Adam Smith |
last post by:
I have posted this and similar questions repeatedly and can't even raise
a single response. I am being led to believe that this then 'Must be a
stupid question' although people say that there is no stupid question.
Is that another for political correctness
I am attempting an install of 7.4.3 on FreeBSD O/S 4.9, apparently
remnants of 7.3.x are scattered around on the disk from (a) previous
ports installation, causing mutex_lock/unlock,...
|
by: Alberto Salvati |
last post by:
Hi, List.
My company has a VERY BIG product base on db2 udb v7.x.
We want to di an upgrade to v9, but.... current db has a lot of
procedure (cobol..!).
Therefore, we've planned to rewrite this code in sql or other language.
My (stupid, i think..) question is:
someone know a "thing" (wizard, tool, application..) helpful to reduce
needed work to convert/transform cobol code?
For example, a tool that dows a reverse enigineering of...
|
by: Lynx101 |
last post by:
Hi, Is this a stupid question?
Senario: Two tables linked together with an ID number.
Question: When using a combo box, which refences another table by
indexed autonumber, is there a way to copy the returned text value to
a text field. I have many combo boxes and after the value changes I
would like a normal text field to show the returned text value,
regardless of which combo box was changed.
|
by: AWW |
last post by:
Running XP - Visual Studio 2005 - VB
Want to have duplicate projects
- one safe and stable
- other for experimenting
Can't fine easy way to make duplicate project.
Stupid question? or stupid ME?
Thanks.
|
by: Alec |
last post by:
Sorry guys, stupid question....
Am no programming expert and have only just started using php for
creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |