返回首页

嗨......
有谁能够告诉我如何按一下按钮,我们可以打开新窗口,在ASP.NET 4.0。
感谢....注意,我没有使用JavaScript ..

回答

评论会员:vivek_cool 时间:2012/02/04

<%@ Page Language="C#" %>

 

<%@ Import namespace="System.Text" %>

 

<script  runat="server">

 

void Page_load(object sender, EventArgs e)

 

{

 

Button1.Attributes.Add( "onclick", "popWin()" );

 

}

 

</script>

 

<html>

 

<head>

 

<script>

 

function popWin()

 

{

 

window.open('yourpage.aspx");

 

}

 

</script>

 

</head>

 

<body>

 

<form  runat="server">

 

<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Go!">

 

</form>

 

</body>

 

</html>

 


或者我们可以尝试这个
页面加载。 (C#中)

{C}的ASPX

<!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="server">

  <title></title>

</head>

<body>

  <form id="form1"  runat="server">

  <div>

    <asp:Button ID="Button1" runat="server" Text="Button" />

  </div>

  </form>

</body>

</html>

评论会员:游客 时间:2012/02/04
nagendrathecoder:imgsrc=http://www.orcode.com/img/ico/smiley_smile.gif]可以帮助你
|这可以帮助你,

{A}

{S0}
评论会员:穆罕默德一个拉赫曼 时间:2012/02/04
什么扇贝,我做的和我不是说其最好的,但我从数据库中读取的东西,比较的东西,我有WAT我要插入。例如,我会检查密码,如果我的数据库中不存在

{体C3}{的C4}
现在systemBusinessLayer是我的班,在那里你可以找到的方法getAuthentication()

{C5的}
{5233}是我的StoredProcedure的SQL查询。

希望它可以帮助...