redirect from javascript

M

Mike P

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?
 
P

Patrice

"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....
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top