如何在按钮单击()上的新选项卡中打开页面
问题描述:
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("../Files/CV's/CV.pdf");
}
答
使用锚标记而不是单击按钮。 http://www.w3schools.com/tags/tag_a.asp [ ^ ]
你可以设置_base的目标是在新窗口或标签中打开它,具体取决于用户的浏览器设置。
Use an anchor tag instead of a button click. http://www.w3schools.com/tags/tag_a.asp[^]
You can set the target to "_base" to have it open in a new window or tab, depending on the users browser settings.