Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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(C#)ʵÏÖÑéÖ¤Â빦ÄÜ´úÂë

н¨Ò»¸öרÃÅÓÃÀ´´´½¨ÑéÖ¤ÂëͼƬµÄÒ³ÃæValidateCode.aspx
ËüµÄºǫ́csÎļþ´úÂëÈçÏ£º
PageLoad
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
private void Page_Load(object sender, System.EventArgs e)
{
string checkCode = CreateRandomCode(4);
Session["CheckCode"] = checkCode;
CreateImage(checkCode);
}
ÆäÖÐCreateRand ......

Window 2003+iis 6.0 ÅäÖÃasp.net ²½Öè

ÐÂÊÖ£¬ÉÏÍøGOOGLEÁ˰ëÌ죬Ҳû·¢ÏÖÒ»¸ö×î¼òµ¥µÄ½â¾ö·½°¸£¬¸÷ÍøÕ¾¶¼ÊÇÔÚ³­À´³­È¥¡£
¸Õ¸ÕÅäÖÃÁËһ̨еÄasp.netµÄÍøÕ¾£¬Ð´Ò»Ï·½Ê½£¬¸ø×Ô¼º×ö¸ö×ܽᡣ
1.°²×°iis 6.0,¾ÍÓÃwindows 2003 ×Ô´ø¹âÅ̾ͿÉÒÔ¡£
2.´ò¿ªiis£¬ Ñ¡ÔñÍøÕ¾->н¨-> ÍøÕ¾£¬È»ºóÑ¡ÔñĿ¼°¡£¬ÆðÃû°¡Ê²Ã´µÄ£¬ºÜÕý³£µÄ²½Öè¡£×¢Òâ°Ñ½Å±¾×ÊÔ´ÄǸö¸øÑ¡ÖÐ ......

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#µ÷ÓÃC DLL

ÔÚºÏ×÷¿ª·¢Ê±£¬C#ʱ³£ÐèÒªµ÷ÓÃC++DLL£¬µ±´«µÝ²ÎÊýʱʱ³£Óöµ½ÎÊÌ⣬ÓÈÆäÊÇ´«µÝºÍ·µ»Ø×Ö·û´®ÊÇ£¬ÏÖ×ܽáһϣ¬·ÖÏí¸ø´ó¼Ò£º
VC++ÖÐÖ÷Òª×Ö·û´®ÀàÐÍΪ£ºLPSTR,LPCSTR, LPCTSTR, string, CString, LPCWSTR, LPWSTRµÈ
µ«×ªÎªC#ÀàÐÍÈ´²»ÍêÈ«Ïàͬ¡£
Ö÷ÒªÓÐÈçϼ¸ÖÖת»»£º
½«stringתΪIntPtr£ºIntPtr System.Runtime.InteropServ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ