Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

redirect from javascript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike P - 15 Oct 2007 12:57 GMT
Is it possible to do a redirect from Javascript, and pass to it a value
that is in your server side code, such as a ViewState value?
Patrice - 15 Oct 2007 13:08 GMT
"redirect" is generally used server side.

document.location.href allows to point the browser to another URL. Or you
could change the action property to submit data on another page ? Or it
could be an AJAX call etc...

You may want to explain what you are trying do (I mean the functionality you
are trying to implement rather than how to implement the solution you seems
to have in mind for your problem).

This way one could suggest a possibly better approach or we'll better
understand what is this "redirect" you are talking about....

> Is it possible to do a redirect from Javascript, and pass to it a value
> that is in your server side code, such as a ViewState value?
>
> *** Sent via Developersdex http://www.developersdex.com ***
Alexey Smirnov - 15 Oct 2007 13:09 GMT
> Is it possible to do a redirect from Javascript, and pass to it a value
> that is in your server side code, such as a ViewState value?

js-redirect can be done using location.href:

window.location.href=page.aspx?id=123

and you can take the value in ASP.NET using Request.QueryString

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.