Reputation: 189
I am using C#
and asp.net
to launch a webpage that I am passing parameters to. That works well! I come from a Windows.Forms
background so please forgive me if I am trying to achieve the impossible. What I would like is set the Visibility
property of the program (either IE or chrome) to false so the user never sees that a webpage is being launched. I have been using this JS
function to close the page, but it seems that the page must completely load before closing which sometimes can take a few seconds.
Does asp.net
have the capability to achieve such? And this is my JS
code I have been using
string close = @"<script type = 'text/javascript'>
window.returnValue = true;
window.close();
</script>";
base.Response.Write(close);
Upvotes: 1
Views: 37
Reputation: 11514
On the Project Properties page, Web tab, Start Action section, click the radio button for "Don't open a page. Wait for a request from an external application".
Upvotes: 0
Reputation: 2093
If you don't want the User to see the page, I assume you just want to post some information to the page. In that case, make an HTTP request via c# code, instead of opening the webpage up in a browser.
Upvotes: 2