在后台怎么在新页面中打开一个超链接啊
在后台如何在新页面中打开一个超链接啊?我在一个DropDownList的DataFileValue上绑定了网址,通过点击按钮在
在后台如何在新页面中打开一个超链接啊?
我在一个DropDownList的DataFileValue上绑定了网址,通过点击按钮在新页面中打开DropDownList上绑定的网址。这个功能如何实现啊?
[最优解释]
Response.Write("<script>window.open.....</script>")或
Page.ClientScript.RegisterClientScriptBlock(this,this.GetType(),"js","window.open.....",true)
试试
[其他解释]
你的意思是window.open?
[其他解释]点击按钮 获取值。this.Dropdownlist.SelectValue;
Response.Redirect("值")
[其他解释]
public void Button1_Click(object sender,EventArgs e)
{
string url = this.DropDownList1.SelectedItem.Text.Trim();
Response.Redirect(url);
}
[其他解释]人家问的是在新页面打开,那些Response.Redirect的就算了吧
[其他解释]恩,我是用window.open();实现的。
[其他解释]public void DropDownList1_SelectChange(object sender,EventArgs e)
{
string url = this.DropDownList1.SelectedValue.Trim();
Response.Redirect(url);
}
[其他解释]url 要写全,http://www.baidu.com 这种
[其他解释]我试了用window.open();浏览器会阻止。我用的是win7系统。