c# net 后台打开新网页

来源:百度知道 编辑:UC知道 时间:2024/05/26 17:07:19
Response.Redirect();
相当于浏览器中,在新窗口打开。
能不用脚本吗?我就想知道c# 后台里有没有这种方法。

用脚本是不明智的选择
<form id="form1" runat="server" target="_blank">
关键在于target="_blank"这行代码 这行起到决定性的作用

///////////////////////最新更细
重新定向到一个页面

试试看这段代码:

<script language="C#" runat="server">
protected void Page_Load(object sender, EventArgs e)
{

}

protected void Go(object sender, EventArgs e)
{
Response.Redirect(list.SelectedItem.Text);
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat=