window open
-
I am trying to have a C# 2010 web form call another web page using a response.redirect and that is not working. I am wondering if I can setup a
window.open('~/www.site.com'); return false;
to have a web form page point to the correct webpage I am looking for. Can you tell me how to accomplish this goal by using a window.open statement?
-
I am trying to have a C# 2010 web form call another web page using a response.redirect and that is not working. I am wondering if I can setup a
window.open('~/www.site.com'); return false;
to have a web form page point to the correct webpage I am looking for. Can you tell me how to accomplish this goal by using a window.open statement?
Your question is vague. We cannot help you unless you mention the specifics. What do you want to do? Do you want to redirect user to another page when the user clicks on a link? Or do you want to post data to another page? Or do you want to post data to server and redirect the user based on the response you get?
-
Your question is vague. We cannot help you unless you mention the specifics. What do you want to do? Do you want to redirect user to another page when the user clicks on a link? Or do you want to post data to another page? Or do you want to post data to server and redirect the user based on the response you get?
-
I am trying to have a C# 2010 web form call another web page using a response.redirect and that is not working. I am wondering if I can setup a
window.open('~/www.site.com'); return false;
to have a web form page point to the correct webpage I am looking for. Can you tell me how to accomplish this goal by using a window.open statement?
window.open('http://www.site.com'); return false; if you want to open a popup to another website [EDIT] you can't post data to another page in this manner. Usually in this case, it's a credit card form, in which you get an api, and you populate your page with the textboxs, and then post to another page. The next page will consume the data, and send you back to the original page.
It's really not an asp.net issue, and just basic html, unless your using code behind to alter the form tag, or doing something fancy.
-
window.open('http://www.site.com'); return false; if you want to open a popup to another website [EDIT] you can't post data to another page in this manner. Usually in this case, it's a credit card form, in which you get an api, and you populate your page with the textboxs, and then post to another page. The next page will consume the data, and send you back to the original page.
It's really not an asp.net issue, and just basic html, unless your using code behind to alter the form tag, or doing something fancy.
Does the
window.open('http://www.site.com'); return false;
only work in javascript? I am asking that question since I cannot get this to work in C#. Can you also show me how to code the window open in a popup window? Thans!
-
Does the
window.open('http://www.site.com'); return false;
only work in javascript? I am asking that question since I cannot get this to work in C#. Can you also show me how to code the window open in a popup window? Thans!
That's Javascript, doesnt' matter if it's c# or VB, Javascript runs on the client, and not the server.
dcof wrote:
Can you also show me how to code the window open in a popup window?
Thans!Your looking at it, in the last post and below, it open another browser instance or tab to the website you call.
window.open('http://www.site.com'); return false;
But you said you wanted to post data to another website, Javascript won't do that It's the Form tag http://www.w3schools.com/html/html_forms.asp[w3schools - Form Tag^] [MSDN Form Tag^]
-
I want to post data to another page and return to the same spot I was at. When I return to my original page, I want to update the data as what was happening before.
There are 2 ways that you can achieve this. 1. Use a Ajax call to the other page and based on the result you get, you can update the current page. This is the easiest way. 2. Use a normal postback to the server, to the other page. While you do that, post the current URL as a parameter too. So in the other page, perform your logic, redirect to the passed URL and use session (recommended) or viewstate or some data store to send the values that you want to update the other page :) Hope this helps and makes sense Regards