ASP.NET JS³£Ó÷½·¨Àà
using System.Web;
/// <summary>
/// Javascript³£Ó÷½·¨
/// </summary>
public class JS
{
private static string ScriptStart = "<script type=\"text/javascript\">";
private static string ScriptEnd = "</script>";
/// <summary>
/// дÈëJS½Å±¾ÄÚÈÝ
/// </summary>
/// <param name="ScriptString">½Å±¾ÄÚÈÝ</param>
/// <param name="IsResponseEnd">ÊÇ·ñÖжϷþÎñ¶Ë½Å±¾Ö´ÐÐ</param>
public static void WriteScript(string ScriptString, bool IsResponseEnd)
{
HttpContext.Current.Response.Write(ScriptStart);
HttpContext.Current.Response.Write(ScriptString);
HttpContext.Current.Response.Write(ScriptEnd);
if (IsResponseEnd)
{
HttpContext.Current.Response.End();
}
}
/// <summary>
/// µ¯³ö¾¯¸æ¿ò
/// </summary>
/// <param name="AlertMessage">ÌáʾÐÅÏ¢</param>
/// <param name="IsResponseEnd">ÊÇ·ñÖжϷþÎñ¶Ë½Å±¾Ö´ÐÐ</param>
public static void Alert(string AlertMessage, bool IsResponseEnd)
{
HttpContext.Current.Response.Write(ScriptStart);
HttpContext.Current.Response.Write("alert('" + AlertMessage + "');history.back();");
HttpContext.Current.Response.Write(ScriptEnd);
&nb
Ïà¹ØÎĵµ£º
1>>δÄܼÓÔØÎļþ»ò³ÌÐò¼¯“System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35”»òËüµÄijһ¸öÒÀÀµÏϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
½â¾ö£ºµ½C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 1.0\Assemblies ÏÂÕÒµ½ System.Web.Mvc.dll Îļþ ¸´ÖƵ½ÏîÄ¿µÄbinÄ¿Â¼Ï ......
asp.net·¢²¼ÍøÕ¾Ê±Èý¸öÑ¡ÏîµÄÎÊÌâ
·¢²¼ÍøÕ¾µÄʱºòÓÐÈý¸öÑ¡Ï
µÚÒ»¸öÑ¡ÏîÖ¸¶¨·¢²¼ºóÊDz»ÊÇ¿ÉÒÔÐÞ¸ÄaspxÎļþ£¬Èç¹û¹´Ñ¡£¬Ôò·¢²¼ºóµÄÍøÕ¾ÐÐΪ»ù±¾ÓëASP.NET 1.1Ò»Ö£¬Ö»ÒªÃ»ÓÐÔöɾÐ޸Ŀؼþ£¬¿ÉÒÔÖ±½ÓÔÚ·þÎñÆ÷ÉÏÐÞ¸ÄaspxÎļþ²»ÓÃÖØÐ·¢²¼ÍøÕ¾¡£
µÚ¶þ¸öÑ¡ÏîÖ¸¶¨ÊDz»Êǽ«Ã¿¸öaspxÎļþ¶¼±à ......
ÔÚ×î½ü¿ªÊ¼½«AJAX¼¼Êõ¼ÓÈëµ½ÈÕ³£µÄ¿ª·¢¹¤×÷ÖС£ÎÒÔÚ×î½üдÁ˸öAJAXµÄÎÞˢеǽÇÒ¶¯Ì¬Ìí¼Ó·þÎñÆ÷¿Ø¼þµÄ¹¤×÷£¬ÎÒ½«´Ë¹¦ÄܸæËß´ó¼ÒÏ£Íû¶Ô´ó¼ÒµÄ¹¤×÷ÓÐËù°ïÖú¡£Èç¹û´ó¼ÒÓиüºÃµÄ·½·¨ÇÒÔ¸ÒâÔÚ´ËÁôÑÔÈÃÎÒÒ²¿ÉÒÔ·ÖÏíµ½ÄãµÄ³É¹û¡£
Ê×ÏÈÔÚÒ³ÃæÖеÄHTML±ê¼ÇÖмÓÈë¿Ø¼þUpdatePanelºÍÁ½¸öTextboxÒ»¸öButton£º
<asp:UpdatePanel ID ......
Ò»¡¢ASP.NET Web Service´úÂë
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
namespace WebService1
{
/// <sum ......
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
namespace class_new
{
/// <summary>
/// DataClass µÄժҪ˵Ã÷¡£
/// </summary>
public class DataClass
{
private string strConnection="";
&n ......