⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.aspx.cs

📁 《圣殿祭司的ASP.NET 2.0开发详解——使用C#》光盘内容.包含了书籍所含的源代码.非常经典的一本asp.net2.0的书籍
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
using System.Text;

public partial class Test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
		/*
		// Define the array name and values.
		String arrName = "MyArray";
		String arrValue = "\"1\", \"2\", \"text\"";

		// Define the hidden field name and initial value.
		String hiddenName = "MyHiddenField";
		String hiddenValue = "3";

		// Define script name and type.
		String csname = "ConcatScript";
		Type cstype = this.GetType();

		// Get a ClientScriptManager reference from the Page class.
		ClientScriptManager cs = Page.ClientScript;

		// Register the array with the Page class.
		cs.RegisterArrayDeclaration(arrName, arrValue);

		// Register the hidden field with the Page class.
		cs.RegisterHiddenField(hiddenName, hiddenValue);

		// Check to see if the  script is already registered.
		if (!cs.IsClientScriptBlockRegistered(cstype, csname))
		{
			StringBuilder cstext = new StringBuilder();
			cstext.Append("<script type=text/javascript> function DoClick() {");
			cstext.Append("Form1.Message.value='Sum = ' + ");
			cstext.Append("(parseInt(" + arrName + "[0])+");
			cstext.Append("parseInt(" + arrName + "[1])+");
			cstext.Append("parseInt(" + Form1.Name + "." + hiddenName + ".value));} </");
			cstext.Append("script>");
			cs.RegisterClientScriptBlock(cstype, csname, cstext.ToString(), false);
		}
		 * */





    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -