asp.net(c#) Ë®ÏÉ»¨Êý
Ë®ÏÉ»¨Êý£ºÒ»¸öÈýλÕûÊý¸÷λÊý×ÖµÄÁ¢·½ºÍµÈÓÚ¸ÃÊý±¾Éí¾Í³Æ¸ÃÊýΪˮÏÉ»¨Êý£¬Ë®ÏÉ»¨Êý¹²ÓÐ4¸ö£¬·Ö±ðΪ£º153¡¢370¡¢371¡¢407( ÀýÈ磺1^3 + 5^3 + 3^3 = 153 )¡£ÎÒдµÄ´úÂëÈçÏ£¬ÄãÓÐÆäËûµÄʵÏÖ´úÂëÒ²¿ÉÒÔ·¢±íÆÀÂÛ¡£
int i, m,n,k;
for (i = 100; i < 1000; i++)
{
//È¡µÃ°ÙλÊý
m = i / 100;
//È¡µÃʮλÊý£¬ÕâÀïÒ²¿ÉÒÔÓÃn = (i%100)/10;
n = i/10%10;
//È¡µÃ¸öλÊý
k = i % 10;
//´òÓ¡Êä³öË®ÏÉ»¨Êý
if (m * m * m + n * n * n + k * k * k == i)
Response.Write(i + "<br />");
}
Ïà¹ØÎĵµ£º
µ±Ð´´½¨Ò»¸öasp.net mvcÓ¦ÓóÌÐò£¬»á×Ô¶¯²úÉúÒ»¸ö·ÓÉÅäÖá£
Global.asax.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace mvcApp
{
// Note: For instructions on enabling IIS6 or IIS7 classic m ......
ÍøÒ³ÖгöÏÖ“'sys' 䶨Òå
”»ò“'Sys' is undefined”µÄ´íÎó¡£
´ËʱÎÒÃÇÒª×öµÄÊÇÔÚ web.config
ÖÐ <system.web> Ò»½ÚÏÂÃæÌí¼ÓÀàËÆ
ÈçÏÂÄÚÈÝ£º
<httpHandlers>
<add
verb="GET,HEAD" path="ScriptResource.a ......
1£©
XMLÊÇÒ»ÏîÈÈÃŵļ¼Êõ¡£ËüÖ®ËùÒÔÄܹ»ÒýÆðÈËÃǵÄÐËȤ£¬Ò»¸öÖ÷ÒªµÄÔÒòÔÚÓÚËüÊ®·ÖµÄ¼òµ¥£¬ÈËÃÇ¿ÉÒÔºÜÈÝÒ×µØÀí½âºÍʹÓÃËü¡£Ã¿Ò»¸ö³ÌÐòÔ±¶¼ÄÜÇáÒ׵ؿ´¶®Ò»¸öXMLÎļþ£¬Àí½âËü°üº¬µÄÄÚÈÝ¡£
.NETÖаüº¬Á˺ܶàÖ§³ÖXMLµÄÀ࣬ÕâЩÀàʹµÃ³ÌÐòԱʹÓÃXML±à³Ì¾ÍÈçͬÀí½âXMLÎļþÒ»Ñù¼òµ¥¡£ÔÚÕâÆªÎÄÕÂÖУ¬ÎÒ½«¸ø³öÕâÑùµÄÒ»¸öÀàµÄʹÓÃʾ ......
¡¡¡¡1.1 ʲôÊÇASP.net
¡¡¡¡ASP.net ÊÇÒ»ÖÖ½¨Á¢ÔÚͨÓÃÓïÑÔÉϵijÌÐò¹¹¼Ü£¬Äܱ»ÓÃÓÚһ̨Web·þÎñÆ÷À´½¨Á¢Ç¿´óµÄWebÓ¦ÓóÌÐò¡£ASP.netÌṩÐí¶à±ÈÏÖÔÚµÄWeb¿ª·¢Ä£Ê½Ç¿´óµÄµÄÓÅÊÆ¡£
¡¡¡¡Ö´ÐÐЧÂʵĴó·ùÌá¸ß
¡¡¡¡ASP.netÊǰѻùÓÚͨÓÃÓïÑԵijÌÐòÔÚ·þÎñÆ÷ÉÏÔËÐС£²»ÏñÒÔǰµÄASP¼´Ê±½âÊͳÌÐò£¬¶øÊǽ«³ÌÐòÔÚ·þÎñÆ÷¶ËÊ×´ÎÔËÐÐʱ½øÐ ......
AutoPostBackÄÄÈ¥ÁË?
´ÓǰʹÓÃweb
Form¿ª·¢µÄ³ÌÐòÔ±¾³£»áÎʵ½AutoPostBackÅÜÄÄÈ¥ÁË£¿Ê¹ÓÃIDE£¬²¢ÇÒÔÚAutoPostBack´ò¸ö¹´ÊǷdz£ÈÝÒ׵ġ£¶øÕýÊÇÒòΪÈÝÒ×ʹ
Óã¬ËùÒÔ´ó¶à¿ª·¢ÈËÔ±²»»áÈ¥ÏëAutoPostBackÊÇÔõÑùµÄ»úÖÆ¡£Êµ¼ÊÉÏ£¬Èç¹ûÄãÑ¡ÔñAutoPostBack£¬ÔòDropDownList»á±»Ìí¼Ó
Ò»¸öÒý·¢javascriptʼþµÄonchangeÊôÐÔ£¬µ¼ÖÂD ......