Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.net c# js·þÎñÆ÷¶Ë³£ÓÃ

using System;
using System.Web;
namespace pub.mo
{
public class js
{
private js() { }
private static string scr_j1 = "<mce:script type=\"text/javascript\"><!--
";
private static string scr_j2 = "
// --></mce:script>";
/// <summary>
/// ÊäÈëjs²¢Í£Ö¹ÔËÐÐ
/// </summary>
/// <param name="str"></param>
public static void write_js(string str)
{
HttpContext.Current.Response.Write(config.j1);
HttpContext.Current.Response.Write(scr_j1);
HttpContext.Current.Response.Write(str);
HttpContext.Current.Response.Write(scr_j2);
HttpContext.Current.Response.Write(config.j2);
HttpContext.Current.Response.End();
}
/// <summary>
/// ÊäÈëjs,ÎÞResponse.End()
/// </summary>
/// <param name="str"></param>
public static void write_js1(string str)
{
HttpContext.Current.Response.Write(config.j1);
HttpContext.Current.Response.Write(scr_j1);
HttpContext.Current.Response.Write(str);
HttpContext.Current.Response.Write(scr_j2);
HttpContext.Current.Response.Write(config.j2);
}
/// <summary>
/// µ¯³öÏûÏ¢¿ò µãÈ·¶¨ºóhistory.back();
/// </summary>
/// <param name="str"></param>
public static void alert(string str)
{
HttpContext.Current.Response.Write(config.j1);
HttpContext.Current.Response.Write(scr_j1);
HttpContext.Current.Response.Write("alert('" + str + "');history.back();");
HttpContext.Current.Response.Write(scr_j2);
HttpContext.Current.Response.Write(config.j2);
HttpContext.Current.Response.End();
}
/// <summary>
///
/// </sum


Ïà¹ØÎĵµ£º

asp.netÒ³ÃæÉúÃüÖÜÆÚÒ²³ÆÖ´ÐÐ˳Ðò

1.¶ÔÏó³õʼ»¯£¨OnInit·½·¨£©
    Ò³ÃæÖеĿؼþ(°üÀ¨Ò³Ãæ±¾Éí)¶¼ÊÇÔÚËüÃÇ×î³õµÄFORMÖб»Ê״γõʼ»¯µÄ¡£Í¨¹ýÔÚASPXÒ³ÃæµÄºǫ́´úÂëÎļþµÄ¹¹ÔìÆ÷ÖÐÉùÃ÷ÄãµÄ¶ÔÏó£¬Ò³Ã潫֪µÀ¶ÔÏóµÄÀàÐÍ£¬²¢ÖªµÀÐèÒª´´½¨¶àÉÙ¸öÕâÑùµÄ¶ÔÏó¡£Ò»µ©ÄãÔÚ¹¹ÔìÆ÷ÖÐÉùÃ÷ÁËÄãµÄ¿Ø¼þ£¬Äã¾Í¿ÉÒÔÔÚËüµÄÈκÎ×ÓÀ࣬·½·¨£¬Ê¼þ»òÕßÊôÐÔÖзà ......

ASP.NETÓëJavaSrcipt½»»¥ÎÊÌâ

1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ;
          2¡¢ÔÚǰ̨дһ¸öjsº¯Êý£¬ÄÚÈÝΪdocument.getElementById("btn1").click();
          3¡¢ÔÚǰ̨»òºóÌ ......

asp.netÖнâ¾öÒ³ÃæË¢Ðºó×ÖÌåµÈ±ä´óµÄÎÊÌâ

½ñÌìÔÚcsdnÉÏ¿´µ½Ò»Æª²©¿Í£¬Êǽ²½â¹ØÓÚ'asp.netÖнâ¾öÒ³ÃæË¢Ðºó×ÖÌåµÈ±ä´óÎÊÌâµÄ',¿´ÁËһϣ¬¸Ð¾õдµÄ²»ÊǺÜÏêϸ¡£ÄÇô£¬ÎÒÀûÓÃËûµÄʵÀýÀ´¾ßÌåÁ˽âһϣº
Ô­ÎÄ£º
 
protected void Button1_Click(object sender, EventArgs e)
        {
     &nb ......

C# Éú³ÉXMLʱµÄÌØÊâ×Ö·û³öÏÖÒì³£´¦Àí

Éú³É¶Ë´¦Àí
½«ÒªÐ´ÈëµÄÖµµÄǰºóдÉÏÈç:"<![CDATA[" + string+ "]]>";
XmlNode xnformchild = doc.CreateNode(XmlNodeType.Element, dc.ColumnName.ToUpper(), "");
try
{
xnformchild.InnerXml = drform[dc.ColumnName].ToString( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ