62,046
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 id="Head1" runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div> </div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ForFunction();
Response.Write("<br>");
SqlEx sqldb = new SqlEx();
sqldb.Swi(8);
}
}
public void ForFunction()
{
for (int i = 1; i <= 5; i++)
{
Response.Write(i);
}
}
}
class SqlEx
{
public void Swi(int iiii)
{
switch (iiii)
{
case 1:
strRw("不要迷恋哥");
break;
case 2:
strRw("哥只是个传说");
break;
case 3:
strRw("哥早已不在江湖,");
break;
case 4:
strRw("江湖上却依然流传着哥的传说.");
break;
default:
strRw("不要迷恋哥,哥只是个传说.哥早已不在江湖,江湖上却依然流传着哥的传说.");
break;
}
}
public void strRw(string str)
{
System.Web.HttpContext.Current.Response.Write(str);
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 id="Head1" runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div> </div>
</form>
</body>
</html>
的<body onload=“xxx()”>