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

asp.netÑéÖ¤Âë

using System.Drawing;
using System.Drawing.Drawing2D;
Àࣺ
/// <summary>
/// Éú³ÉÑéÖ¤Âë
/// </summary>
private void DrowCode()
{
Response.Cache.SetNoStore();
System.Drawing.Bitmap image = new System.Drawing.Bitmap(77, 20);
Graphics g = Graphics.fromImage(image);
Color[] borders = new Color[10] { Color.AliceBlue, Color.Aqua, Color.Black, Color.Brown, Color.DarkRed, Color.SkyBlue, Color.Silver, Color.Tan, Color.Violet, Color.SpringGreen };
try
{
Random random = new Random();
g.Clear(Color.White);
//»­Í¼Æ¬µÄ±³¾°ÔëÒôÏß
for (int i = 0; i < 2; i++)
{
int x1 = random.Next(image.Width);
int x2 = random.Next(image.Width);
int y1 = random.Next(image.Height);
int y2 = random.Next(image.Height);
g.DrawLine(new Pen(Color.Silver), x1, y1, x2, y2);
}
string str = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
string[] codes = str.Split(',');
string serial = string.Empty;
for (int i = 0; i < 6; i++) // i ¿ØÖÆÑéÖ¤Âë×Ö·û¸öÊý
{
serial += codes[random.Next(codes.Length)];
}
Font font = new System.Drawing.Font("Verdana", 11, System.Drawing.FontStyle.Bold);
System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Blue, Color.DarkRed, 1.2f, true);
g.DrawString(serial, font, brush, random.Next(image.Width - 77), random.Next(image.Height - 20));
//»­Í¼Æ¬µÄÇ°¾°ÔëÒôµã
for (int i = 0; i < 50; i++)
{
int x = random.Next(image.Width);
int y = random.Next(image.Height);
image.SetPixel(x, y,


Ïà¹ØÎĵµ£º

asp.net 2.0×¢²áiis ÎÞ·¨ÏÔʾ¸ÃÒ³

ÓÐʱºòÓÃiisÅäÖõÄÍøÕ¾£¬×ÜÊdzöÏÖÎÞ·¨ÏÔʾ¸ÃÒ³µÄÌáʾ
³öÏÖÕâÖÖÎÊÌâµÄÔ­ÒòÓжàÖÖ£¬¾ßÌåÊÇÄÄÖÖ£¬×ÜÒ²¸ã²»´óÃ÷°×£¬²»¹ý£¬Ã¿´ÎÈ¥½â¾öÕâ¸öÎÊÌâµÄʱʱºò£¬
×Ü»áÏëµ½Õâ¸ö·½·¨£º
¾ÍÊÇ.net ÖØÐÂ×¢²áiis
²Ù×÷ÊÇ£º
1.ÔÚ“¿ªÊ¼”--“ÔËÐДÖÐÃüÁîÌáʾ·ûÏ ÊäÈë“cd C:\WINDOWS\Microsoft.NET\Framework\ ......

ASP.NET AJAX ÖУ¬Óà JavaScript µ÷Ó÷þÎñÆ÷¶ËµÄ·½·¨

ÕâÀï²»ÊÇÖ¸µ÷Óüòµ¥µÄ PageMethod£¬ÒòΪ¾²Ì¬·½·¨ÊDz»ÄܲÙ×÷µ±Ç°Ò³ÃæµÄ¿Ø¼þµÄ£¬ËùÒÔ¾²Ì¬µÄ PageMethod ×÷Óþ͸úÆÕͨµÄ WebService Ò»Ñù£¬±È½Ï¾ÖÏÞ¡£
ÄÇô£¬µ÷ÓÃÒ»°ãµÄ·þÎñÆ÷¶Ë·½·¨£¬Æäʵ¾ÍÊÇ·¢ÆðÒ»¸öÒì²½»Øµ÷¡£×î¼òµ¥µÄʵÏÖ°ì·¨£¬ÊÇͨ¹ý UpdatePanel À´×ö¡£
Ê×Ïȶ¨ÒåÒ»¸öÒþ²ØµÄ LinkButton£¬ÔÚÆä´¦ÀíʼþÖУ¬È¥µ÷ÓÃÎÒÃÇÒªÖ ......

ASP.NETÃæÊÔÌâ .NETϵÁÐÃæÊÔÌâ


2009-12-03
1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
2 .ÁоÙASP.NET Ò³ÃæÖ®¼ä´«µÝÖµµÄ ......

´ÓASP.NETÓ¦ÓóÌÐòÉú´æÖÜÆÚ̸Æð

  ²»Öª²»¾õ¹¤×÷ÒѾ­Á½Äê¶àÁË£¬Ò»Ö±Ïë°Ñ¹ýÈ¥µÄµãµãµÎµÎ»ýÀ۵ľ­ÑéдÏÂÀ´£¬µ«ÊÇÒ»Ö±ÄÑÒÔÍê³É£¬Ò»ÊÇʱ¼äµÄÏÞÖÆ£¬ÔÙÊÇËùÒԵö«Î÷»¹ÊDZȽÏÔÓÂÒ£¬Ò»Ê±ÄÑÒÔÕûÀí¡£ÏÂÃæ¾Í´ÓASP.NETÓ¦ÓóÌÐòÉú´æÖÜÆÚ¿ªÊ¼Ì¸Æð£¬Ö÷ÒªÊÇÒÔ´ËΪһ¸ö¿ªÍ·£¬ÀϲûÊö¸öÈ˵ÄһЩ¾­Ñé¾­Ñé̸֮ºÍ¶Ô²Î¿¼Ò»Ð©×ÊÁϵÄÀí½â¡£
  Ê×ÏÈ£¬ÎÊÌâÒ»£ºÎÒÃÇ´ò¿ªÒ»¸öÍ ......

asp.netÊä³ö png ͼÏñ£¬

asp.netÊä³ö png 32λ ͼÏñ£¬´ø͸Ã÷alpha¡£
// pngtest.htm
<html>
<head></head>
<body bgColor="gray">
<img src="png.ashx" />
</body>
</html>
//  png.ashx
<%@ WebHandler Language="C#" Class="Png" %>
using System.Web;
public class Png : IHtt ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ