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

asp.net ÑéÖ¤Âë ʵÏÖ

µÚ1ÖÖ.
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.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.Drawing;
public partial class fetchcode : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Random rd = new Random(); //´´½¨Ëæ»úÊý¶ÔÏó
//ÒÔÏÂ4ÐÐ,²úÉúÓÉ6¸ö×ÖĸºÍÊý×Ö×é³ÉµÄÒ»¸ö×Ö·û´®
string str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ÎÒÄãËû";
string my51aspx = "";
for (int i = 0; i < 4; i++)
{
my51aspx = my51aspx + str.Substring(rd.Next(39), 1);
}
//ÑéÖ¤ÂëÖµ´æ·Åµ½SessionÖÐÓÃÀ´±È½Ï
Session["Valid"] = my51aspx;
//ÒÔÏÂÈý¾ä,ͨ¹ýËæ»úÕÒÒ»¸öÏÖÓÐͼÏó²úÉúÒ»¸ö»­²¼Bitmap
string bgFilePath = Server.MapPath(".\\images\\bg" + new Random().Next(5) + ".jpg");//Ëæ»úÕÒ¸öͼÏó
// string bgFilePath = Server.MapPath(".\\images\\bg2" + ".jpg");//Ëæ»úÕÒ¸öͼÏó
System.Drawing.Image imgObj = System.Drawing.Image.fromFile(bgFilePath);
Bitmap newBitmap = new Bitmap(imgObj, 90, 30);//½¨Á¢Î»Í¼¶ÔÏó
Graphics g = Graphics.fromImage(newBitmap);//¸ù¾ÝÉÏÃæ´´½¨µÄλͼ¶ÔÏó´´½¨»æÍ¼Ãæ
Color[] fore = { Color.Black ,Color.Red};
SolidBrush brush = new SolidBrush(fore[new Random().Next(2)]);//ÉèÖû­±ÊÑÕÉ«
//¶¨ÒåÒ»¸öº¬10ÖÖ×ÖÌåµÄÊý×é
String[] fontFamily = { "Arial", "Verdana", "Comic Sans MS", "Impact", "Haettenschweiler", "Lucida Sans Unicode", "Garamond", "Courier New", "Book Antiqua", "Arial Narrow" };
//ͨ¹ýÑ­»·,»æÖÆÃ¿¸ö×Ö·û,
for (int a = 0; a < my51aspx.Length; a++)
{
Font textFont = new Font(fontFamily[rd.Next(9)], 15, FontStyle.Regular);//×ÖÌåËæ»ú,×ֺŴóС10,¼Ó´Ö
//ÿ´ÎÑ­»·»æÖÆ


Ïà¹ØÎĵµ£º

Asp.netʹÓÃSqliteÊý¾Ý¿â

 1. ´Óhttp://sqlite.phxsoftware.com ÏÂÔØSystem.Data.SQLite.dll
 2. ´Óhttp://www.sqlite.org/download.html ÏÂÔØ sqlite3.dll
 3. Copy ÒÔÉÏ2¸öDllµ½Asp.netÍøÕ¾µÄbinĿ¼Ï£¬ÀàËÆ  E:\2009work\MyWeb\Bin
 4. ÓÃsqlitespy ¹¤¾ßн¨Êý¾Ý¿â£¬E:\2009work\MyWeb\App_Data\db.db3 £ ......

ÔÚASP.NETÖÐÉÏ´«Í¼Æ¬²¢Éú³ÉËõÂÔͼµÄC#Ô´Âë

http://www.knowsky.com/5723.html
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls; ......

ASP.NET AJAX ʹÓÿͻ§¶Ëµ÷Ó÷þÎñÆ÷¶ËµÄ·½·¨

  Microsoft ASP.NET AJAX¿ÉÒԺܷ½±ãµÄÈÃÎÒÃÇÔÚ¿Í»§¶ËʹÓýű¾µ÷ÓÃASP.NET Web
Services(.asmx),ÒªÆôÓÃÕâÒ»ÌØÐÔ£¬ÏñÇ°ÃæÌáµ½µÄÒ»Ñù£¬±ØÐëÒªÅäÖÃWeb.Config£¬¿ÉÒÔ²ÎÕÕMicrosoft ASP.NET
AJAX°²×°Ä¿Â¼ÏµÄWeb.Config£¬Èç¹ûÊÇͨ¹ýASP.NET AJAX-enabled Web
siteÄ£°æ½¨Á¢µÄÕ¾µã£¬Ôò²»ÐèÒªÔÙ½øÐÐÉèÖÃÁË¡£ÅäÖýڵãÈçÏ ......

asp.netÓÃfckEditor³öÏÖÂÒÂëÎÊÌâ

¹Ø¼üÔÚÉÏ´«µÄʹÓÃÓõ½ÁËupload.aspx,¶øÕâ¸öÒ³ÃæÄ¬ÈϵıàÂëͳһΪutf-8,ËùÒÔÎÒÃÇÒª¸øËü¸Ä±äһϡ£ÔÚÄãµÄweb.configÖÐÔö¼Ó´Ë×Ö¶Î
  <location path="fckeditor/editor/filemanager/connectors/aspx/upload.aspx">
    <system.web>
      <globalization req ......

asp.net²Ù×÷ÅäÖÃÎļþ

 ÓÉÓÚÏîÄ¿ÖжദÐèÒª¶ÔÅäÖÃÎļþ½øÐвÙ×÷£¬ÈçÅäÖÃÐÅÏ¢µÄ¶ÁÈ¡¡¢¸ü¸ÄºÍдÈ룬ÐèÒªÒ»¸öͨÓõÄÀàÀ´¶ÔÆä½øÐвÙ×÷ºÍ´¦Àí¡£Õâ´ÎµÄÈÎÎñ¾ÍÊÇÅäÖýڵÄһЩÓ÷¨¡£
       Õâ´ÎÉý¼¶ºóµÄ¿ª·¢¹¤¾ßÊÇ»ùÓÚVS2005µÄ£¬·ÖÎöÁËVS2005 ÐÂÔöµÄһЩ¹¦ÄÜ£¬Ëü×Ô´øÁËÒ»Ì×ÅäÖÃÎļþÖнáµãµÈµÄÅäÖá£Ä¿Ç°µÄÏîÄ¿ÓõÄÅä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ