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

asp.netÐÔÄÜÓÅ»¯µÄ¼¸¸ö·½Ãæ

c#£¨»òvb.net£©³ÌÐò¸Ä½ø
1¡¢Ê¹ÓÃÖµÀàÐ͵ÄToString·½·¨
¡¡¡¡ÔÚÁ¬½Ó×Ö·û´®Ê±£¬¾­³£Ê¹ÓÃ"+"ºÅÖ±½Ó½«Êý×ÖÌí¼Óµ½×Ö·û´®ÖС£ÕâÖÖ·½·¨ËäÈ»¼òµ¥£¬Ò²¿ÉÒԵõ½ÕýÈ·½á¹û£¬µ«ÊÇÓÉÓÚÉæ¼°µ½²»Í¬µÄÊý¾ÝÀàÐÍ£¬Êý×ÖÐèҪͨ¹ý×°Ïä²Ù×÷ת»¯ÎªÒýÓÃÀàÐͲſÉÒÔÌí¼Óµ½×Ö·û´®ÖС£µ«ÊÇ×°Ïä²Ù×÷¶ÔÐÔÄÜÓ°Ïì½Ï´ó£¬ÒòΪÔÚ½øÐÐÕâÀà´¦Àíʱ£¬½«ÔÚÍйܶÑÖзÖÅäÒ»¸öеĶÔÏó£¬Ô­ÓеÄÖµ¸´ÖƵ½Ð´´½¨µÄ¶ÔÏóÖС£
¡¡¡¡Ê¹ÓÃÖµÀàÐ͵ÄToString·½·¨¿ÉÒÔ±ÜÃâ×°Ïä²Ù×÷£¬´Ó¶øÌá¸ßÓ¦ÓóÌÐòÐÔÄÜ¡£
int num=1;
string str="go"+num.ToString();
2¡¢ÔËÓÃStringBuilderÀà
¡¡¡¡StringÀà¶ÔÏóÊDz»¿É¸Ä±äµÄ£¬¶ÔÓÚString¶ÔÏóµÄÖØи³ÖµÔÚ±¾ÖÊÉÏÊÇÖØд´½¨ÁËÒ»¸öString¶ÔÏó²¢½«ÐÂÖµ¸³Óè¸Ã¶ÔÏó£¬Æä·½·¨ToString¶ÔÐÔÄܵÄÌá¸ß²¢·ÇºÜÏÔÖø¡£
¡¡¡¡ÔÚ´¦Àí×Ö·û´®Ê±£¬×îºÃʹÓÃStringBuilderÀ࣬Æä.NET ÃüÃû¿Õ¼äÊÇSystem.Text¡£¸ÃÀಢ·Ç´´½¨ÐµĶÔÏ󣬶øÊÇͨ¹ýAppend£¬Remove£¬InsertµÈ·½·¨Ö±½Ó¶Ô×Ö·û´®½øÐвÙ×÷£¬Í¨¹ýToString·½·¨·µ»Ø²Ù×÷½á¹û¡£
¡¡¡¡Æ䶨Òå¼°²Ù×÷Óï¾äÈçÏÂËùʾ£º
int num;
System.Text.StringBuilder str = new System.Text.StringBuilder(); //´´½¨×Ö·û´®
str.Append(num.ToString()); //Ìí¼ÓÊýÖµnum
Response.Write(str.ToString); //ÏÔʾ²Ù×÷½á¹û
3¡¢Ê¹Óà HttpServerUtility.Transfer ·½·¨ÔÚͬһӦÓóÌÐòµÄÒ³Ãæ¼äÖض¨Ïò
¡¡¡¡²ÉÓà Server.Transfer Óï·¨£¬ÔÚÒ³ÃæÖÐʹÓø÷½·¨¿É±ÜÃâ²»±ØÒªµÄ¿Í»§¶ËÖض¨Ïò£¨Response.Redirect£©¡£
4¡¢±ÜÃâʹÓÃArrayList¡£
ÒòΪÈκζÔÏóÌí¼Óµ½ArrayList¶¼Òª·âÏäΪSystem.ObjectÀàÐÍ£¬´ÓArrayListÈ¡³öÊý¾Ýʱ£¬Òª²ðÏä»Øʵ¼ÊµÄÀàÐÍ¡£½¨ÒéʹÓÃ×Ô¶¨ÒåµÄ¼¯ºÏÀàÐÍ´úÌæArrayList¡£asp.net 2.0ÌṩÁËÒ»¸öеÄÀàÐÍ£¬½Ð·ºÐÍ£¬ÕâÊÇÒ»¸öÇ¿ÀàÐÍ£¬Ê¹Ó÷ºÐͼ¯ºÏ¾Í¿ÉÒÔ±ÜÃâÁË·âÏäºÍ²ðÏäµÄ·¢Éú£¬Ìá¸ßÁËÐÔÄÜ¡£
5¡¢Ê¹ÓÃHashTale´úÌæÆäËû×ֵ伯ºÏÀàÐÍ
£¨ÈçStringDictionary,NameValueCollection,HybridCollection£©£¬´æ·ÅÉÙÁ¿Êý¾ÝµÄʱºò¿ÉÒÔʹÓÃHashTable.
6¡¢Îª×Ö·û´®ÈÝÆ÷ÉùÃ÷³£Á¿£¬²»ÒªÖ±½Ó°Ñ×Ö·û·â×°ÔÚË«ÒýºÅ" "ÀïÃæ¡£
//±ÜÃâ
MyObject obj = new MyObject();
obj.Status = "ACTIVE";
//ÍƼö
const string C_STATUS = "ACTIVE";
MyObject obj = new MyObject();
obj.Status = C_STATUS;
7¡¢²»ÒªÓÃToUpper(),ToLower()ת»»×Ö·û´®½øÐбȽϣ¬ÓÃString.Compare´úÌ棬Ëü¿ÉÒÔºöÂÔ´óСд½øÐбȽÏ.
Àý£º
const string C_VALUE = "COMPARE"


Ïà¹ØÎĵµ£º

ÇåÇå³þ³þasp.net ( Èý ) £ºViewState

ViewState¸ÅÊö
Ò³ÃæÔÚ³õʼ»¯µÄʱºò£¬asp.net»áÔÚÒ³ÃæÄÚ½¨ViewStateÊôÐÔ£¬ÎÒÃÇ¿ÉÒÔ½«ÐèÒª±£´æµÄÊý¾Ý·Åµ½ÊÓͼ״̬µÄ¼¯ºÏÖУ¬ÒÔ´ïµ½ÔÚÒ³Ãæ»Ø·¢µÄʱºò±£´æÊý¾ÝµÄÄ¿µÄ¡£
ʹÓÃViewStateÒÔÇ°£¬ÐèҪעÒâÒÔÏÂÄÚÈÝ£º
1.ViewStateÒÀÀµÓÚ×ֵ伯ºÏ¡£
2.ViewStateÖеÄÿһÏîͨ¹ýΨһµÄ×Ö·û´®Ãû×Ö½øÐÐË÷Òý¡£
ÎÒÃÇÔÚ¸øÊÓͼ¼¯ºÏµÄij¸öË ......

ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂëʵÏÖ

Button±»µã»÷ºódisableµô¸ÃÒ³ÃæÖÐËùÓеÄButton£¬´Ó¶ø·ÀÖ¹Ìá½»ÑÓʱµ¼ÖµĶà´ÎÌá½»¡£»ùÓÚ֮ǰµÄonceclickbutton½Å±¾.
//ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂë:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcElement;
var objs = document.getElementsByTag ......

´ÓÊý¾Ý¿âµ¼³öÊý¾Ýµ½word¡¢excel¡¢.txt _asp.net¼¼ÇÉ

 
ת×Ôhttp://martinyang2010.bokee.com/2598999.html
using System;
using System.Data;
using System.Drawing;
using System.Data.SqlClient;
using Excel;
using Word;
using System.IO;
namespace Common
{
/// <summary>
/// °ÑÊý¾Ýµ¼Èëµ½.doc¡¢.txt¡¢.xlsÎļþÖÐ
/// </summary>
publi ......

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

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

ASP.net 130µÀÃæÊÔÓÃÌâ

1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
 
2 .ÁоÙASP.NET Ò³ÃæÖ®¼ä´«µÝÖµµÄ¼¸ÖÖ·½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ