asp.netÅжÏÊäÈëÎÄ×ÖÊÇ·ñÊÇÊý×Ö (ת)
·½°¸Ò»:
/**//// <summary>
/// Ãû³Æ£ºIsNumberic
/// ¹¦ÄÜ£ºÅжÏÊäÈëµÄÊÇ·ñÊÇÊý×Ö
/// ²ÎÊý£ºstring oText£ºÔ´Îı¾
/// ·µ»ØÖµ£º¡¡bool true:ÊÇ¡¡false:·ñ
/// </summary>
public bool IsNumberic(string oText)
{
try
{
int var1=Convert.ToInt32 (oText);
return true;
}
catch
{
return false;
}
}
try catch·½·¨
Àý£º
try
{
Convert.ToInt32("123"):
Console.Write("ÊÇÊý×Ö");
}
catch(Exception ex)
{
Console.Write("·ÇÊý×Ö");
}
×¢£ºÈç¹ûÓкܶà×Ö·û´®ÒªÇóÅжϣ¬´Ë·½·¨ÐèÒª´óÁ¿µÄtry catch ÒÔ¼°finallyÀ´´¦ÀíºóÐøµÄ³ÌÐò.²»½¨ÒéʹÓô˷½·¨¡£
¸Ä½øÒ»ÏÂ:
ÒòΪ¿ÉÒÔתint ¿ÉÒÔתDecimal
public bool IsNumberic(string oText)
{
try
{
Decimal Number = Convert.ToDecimal (oText);
return true;
}
catch
{
return false;
}
}
·½°¸¶þ:
//Èç¹ûÊÇ´¿Êý×Ö»¹¿ÉÒÔ²ÉÓÃASCIIÂë½øÐÐÅжÏ
/// <summary>
/// ÅжÏÊÇ·ñÊÇÊý×Ö
/// </summary>
/// <param name="str">×Ö·û´®</param>
/// <returns>bool</returns>
public bool IsNumeric(string str)
{
if (str == null || str.Length == 0) &nbs
Ïà¹ØÎĵµ£º
·½·¨1
HttpFileCollection files = HttpContext.Current.Request.Files;
//ÎÒÉèÖõĴóС²»³¬¹ýA4Ö½µÄËõÂÔͼ
int newWidth=620;
int newHeight=880;
System.Drawing.Image img = null;
for(int iFile = 0; iFile < files.C ......
×î½üÔÚÓÃÓû§¿Ø¼þʱ£¬ÒýÓû§¿Ø¼þµÄÒ³ÃæÓÐʱºò»áºÍÓû§¿Ø¼þ½øÐÐÊý¾ÝµÄ½»»¥£¬ÍøÉϺÃÏñºÜ¶àÈ˲»ÖªµÀºÎ»ñÈ¡
д¸öÀý×Ó˵Ã÷Ò»ÏÂ
È¡µÃÓû§¿Ø¼þÀïÃæµÄ¿Ø¼þ²¢½øÐи³Öµ
Óû§¿Ø¼þaspxÒ³´úÂë
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HeadPanel.ascx.cs" Inherits="HeadPanel" %>
& ......
ʲôÊÇMVCģʽ
MVC£¨Model-View-Controller£¬Ä£ÐÍ—ÊÓͼ—¿ØÖÆÆ÷ģʽ£©ÓÃÓÚ±íʾһÖÖÈí¼þ¼Ü¹¹Ä£Ê½¡£Ëü°ÑÈí¼þϵͳ·ÖΪÈý¸ö»ù±¾²¿·Ö£ºÄ£ÐÍ£¨Model£©£¬ÊÓͼ£¨View£©ºÍ¿ØÖÆÆ÷£¨Controller£©¡£
ÄÇôMVCģʽºÍÎÒÃÇÊìϤµÄWebFormģʽÓÐʲô²»Í¬ÄØ£¿ËûµÄ¸÷¸ö²¿·ÖÓÖÊÇÔõÑù·Ö¹¤µÄÄØ£¿
ÎÒÃÇÏÈÀ´¿´Ò»ÏÂÆÕͨµÄWebFormģʽÏ£ ......
[תÌùÒ»]
ʹÓÃASP.NET MVC¿ò¼Ü£¬´´½¨Ä¬ÈÏÏîÄ¿£¬µÚÒ»Ö±¹Û¸Ð¾õ¾ÍÊǵØÖ·¶¼ÊÇRewrite¹ýµÄ¡£¶ÔÔ´ÂëºÍÅäÖÃÎļþÉÔ¼Ó·ÖÎö²»ÄÑ¿´³ö£¬MVCʹÓÃÁËhttpModulesÀ´À¹½ØµØÖ·ÇëÇ󣬾ßÌåÓõ½ÁËSystem.Web.RoutingÀà¿â£¨MVC2ÖУ¬MVC1ÔõôÓõÄÍü¼ÇÁË¡££©¶øÕⲿ·ÖÀà¿â±»°ü×°ÔÚ.NET Framework3.5 SP1ÖУ¬MVC2ÐèÒªSP1Ö§³ÖÒ²¾ÍÀíËùµ±È»ÁË¡£SP1Ìṩµ ......
ÔÚ.netµÄÊÀ½çÀïµ½µ×ÓÐÊ²Ã´ÄØ£¿µÚÒ»¸öÊÇ.net¿ò¼Ü£¨.net Framework)£¬ÏÖÔÚ×îеÄÒѾÊÇ4.0°æ±¾ÁË£¬ºÇºÇ£¬µ«ÊÇÎÒµÄnetcmsÓõÄÊÇ2.0°æ±¾¡£µÚ¶þ¸öÊÇ.net¼¯³É¿ª·¢»·¾³£¬Ò²¾ÍÊÇÎÒÃÇÆ½³£¿´µ½µÄvisual studio .net 2003 £¨2005 2008µÈ£©¡£ÊÇÓÃÀ´Ð´³ÌÐòºÍµ÷ÊÔ³ÌÐòÓõġ£µ±È»,Èç¹ûÄ㹻ţ±Æ£¬ÄãÒ²¿ÉÒÔÓüÇʱ¾ ......