I have this aspx page and it works all fine.
我有这个aspx页面,它工作得很好。
protected void Page_Load(object sender, EventArgs e)
{
string clientID = Request.QueryString["ID"];
string clientName = Request.QueryString["NAME"];
folderSearch(clientID, clientName);
}
public void folderSearch(string clientID, string clientName)
{
SYS.getInfo(searchDBInfo =>
{
string folderPath = searchDBInfo.sPath + "\\" + clientID + " - " + clientName;
if (Directory.Exists(folderPath))
{
Process.Start(folderPath);
}
else
{
Directory.CreateDirectory(folderPath);
Process.Start(folderPath);
}
});
}
I would like the aspx running browser window to be closed straight after it displayed. means user should not be able to see any browser running but it can still do its job in background.
我希望运行浏览器窗口的aspx在显示后直接关闭。意味着用户不应该看到任何浏览器正在运行,但它仍然可以在后台运行。
Please help me guys! Thanks.
请帮帮我们!谢谢。
2 个解决方案
#1
2
I would like the aspx running browser window to be closed straight after it displayed. means user should not be able to see any browser running but it can still do its job in background.
我希望运行浏览器窗口的aspx在显示后直接关闭。意味着用户不应该看到任何浏览器正在运行,但它仍然可以在后台运行。
It is not in your control, it is a browser function, and you can't do anything about it.
它不在你的控制之下,它是一个浏览器功能,你无法做任何事情。
#2
0
The only solution to do this is by Javascript (client side) with window.close() and you'll have a prompt showing you "Do you want to close this window" .
执行此操作的唯一解决方案是使用带有window.close()的Javascript(客户端),并且您将有一个提示,显示“您要关闭此窗口”。
One solution would be to "close" after display is to redirect after a sleep and you'll not have the prompt.
一种解决方案是在显示后“关闭”以在睡眠后重定向并且您将没有提示。
Note : The page won't show up if your server-side code is not finished.
注意:如果服务器端代码未完成,则不会显示该页面。
#1
2
I would like the aspx running browser window to be closed straight after it displayed. means user should not be able to see any browser running but it can still do its job in background.
我希望运行浏览器窗口的aspx在显示后直接关闭。意味着用户不应该看到任何浏览器正在运行,但它仍然可以在后台运行。
It is not in your control, it is a browser function, and you can't do anything about it.
它不在你的控制之下,它是一个浏览器功能,你无法做任何事情。
#2
0
The only solution to do this is by Javascript (client side) with window.close() and you'll have a prompt showing you "Do you want to close this window" .
执行此操作的唯一解决方案是使用带有window.close()的Javascript(客户端),并且您将有一个提示,显示“您要关闭此窗口”。
One solution would be to "close" after display is to redirect after a sleep and you'll not have the prompt.
一种解决方案是在显示后“关闭”以在睡眠后重定向并且您将没有提示。
Note : The page won't show up if your server-side code is not finished.
注意:如果服务器端代码未完成,则不会显示该页面。