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

ASP.NET MVC ÈëÃÅ11¡¢Ê¹ÓÃAJAX

ÔÚASP.NET MVC beta·¢²¼Ö®Ç°£¬M$¾ÍÐû²¼Ö§³Ö¿ªÔ´µÄJS¿ò¼ÜjQuery£¬È»ºóASP.NET MVC
beta·¢²¼ºó£¬Ä㽨Á¢Ò»¸öASP.NET MVC betaµÄÏîÄ¿ºó£¬Äã¿ÉÒÔÔÚÏîÄ¿µÄscriptsĿ¼ÏÂÕÒµ½ASP.NET
AJAXºÍjQueryµÄJS¡£·´ÕýÎÒÊDZȽÏϲ»¶jQueryµÄ£¬ËùÒÔ¶ÔÓÚM$´Ë¾Ù»¹ÊÇͦÐÀοµÄ¡£
·Ï»°²»¶à˵£¬ÎÒÃÇʹÓÃAJAXÀ´ÊµÏÖ·¢±íÆÀÂ۵ŦÄÜ°É¡£ÏÈÀ´¿´¿´ÔõÑùʹÓÃM$µÄJS¿ò¼ÜÀ´½øÐÐÒì²½AJAXÇëÇó¡£
Ê×ÏÈ£¬µ±È»ÊÇÒªÒýÈëM$µÄAJAX¿ò¼ÜµÄJS£º
<
script 
src
="/Content/MicrosoftAjax.js"
 type
="text/javascript"
></
script
>
<
script 
src
="/Content/MicrosoftMvcAjax.js"
 type
="text/javascript"
></
script
>
 
ASP.NET
MVCµÄ¿ò¼ÜµÄHelper·½·¨ÖÐÌṩÁ˶ÔËû×ÔÉíµÄAJAXµÄÖ§³Ö£¬Ê¹ÓõÄÊÇSystem.Web.Mvc.AjaxÃüÃû¿Õ¼äÏÂÃæµÄ·½·¨¡£Äã¿ÉÒÔÕâÑùд´ú
Â룺

»òÕߣº

ÔÚAjaxHelperÖв¢Ã»ÓÐEndForm·½·¨£¬Äã¿ÉÒÔÖ±½ÓдHtmlÀ´¹Ø±Õform£¬»òÕßÄãÒ²¿ÉÒÔʹÓÃHtml.EndForm();À´¹Ø
±Õ¡£ºÃ£¬ÏÂÃæÎÒÃÇÀ´Ð´·¢±íÆÀÂÛµÄAjaxForm£º

ÕâÀïÏêϸ˵ÏÂAjaxOptionsµÄ¿ÉÑ¡ÅäÖõĸ÷¸öÊôÐÔµÄ×÷Óá£
public
 
string
 Confirm £ºÃ»²âÊÔ£¬²»ÖªµÀ¸ÉÂïÓõģ¬ÖªµÀµÄ˵һÏÂ.
public
 
string
 HttpMethod £º¾ÍÊÇÖ¸¶¨ÇëÇóµÄHttp·½·¨£¬
"
POST
"
 
"
GET
"
 
"
PUT
"
 µÈµÈ
public
 InsertionMode InsertionMode £º·µ»ØµÄÄÚÈÝÒª¸üеÄÄ¿±êÔªËصķ½Ê½¡£ÓÐÈýÖÖ·½Ê½£º
    Replace £º
Ì滻Ŀ±êÔªËØÀïÃæµÄÄÚÈÝ£»
    InsertBefore £º·µ»ØÄÚÈݲåÈ뵽Ŀ±êÔªËصÄÇ°Ã棻
    InsertAfter£º·µ»ØÄÚ
ÈݲåÈ뵽Ŀ±êÔªËصĺóÃæ¡£
public
 
string
 LoadingElementId £º
Ö¸¶¨ÔÚ½øÐÐÒì²½ÇëÇóµÄʱºòÒªÏÔʾµÄÌáʾÐÅÏ¢µÄLoadingÔªËصÄID
public
 
string
 OnBegin £ºÔÚ·¢ËÍÒì²½ÇëÇóÇ°´¥·¢µÄJavaScript·½·¨
public
 
string
 OnComplete £ºÔÚ·¢ËÍÒì²½ÇëÇóÍê³Éºó´¥·¢µÄJavaScript·½·¨
public
 
string
 OnFailure £ºÔÚ·¢ËÍÒì²½ÇëÇóʧ°ÜµÄʱºò´¥·¢µÄJavaScript·½·¨
public
 
string
 OnSuccess £ºÔÚ·¢ËÍÒì²½Çë


Ïà¹ØÎĵµ£º

asp.net Ö±½Ó ´ÓÊý¾Ý¿â ÏÂÔØ Îļþ

µ±ÎÒÃÇÏëÒª´ÓÍøÉÏÏÂÔØÎļþʱ£¬Í¨³£µÄ×ö·¨ÊÇÔÚ·þÎñÆ÷ÉϵÄij¸öĿ¼ÏÂÉú³ÉÒ»¸öÎļþ¡£
protected void DownloadFile(string filename)
{
string saveFileName = "test.xls";
int intStart = filename.LastIndexOf("\\") + 1;
saveFileName = filename.Substring(intStart, filename.Lengt ......

ASP.NET(C#)ʵÏÖÒ»´ÎÐÔÉÏ´«¶àÕÅͼƬ£¨¶à¸öÎļþ£©

ÔÚ×öasp.netµÄWeb¿ª·¢µÄʱºò£¬ÎÒÃǾ­³£»áÓöµ½Ò»´ÎÐÔÉÏ´«¶à¸öÎļþµÄÐèÇó¡£Í¨³£ÎÒÃǵĽâ¾ö·½·¨Êǹ̶¨·Å¶à¸öÉÏ´«Îļþ¿ò£¬ÕâÑùµÄ½â¾ö°ì·¨ÏÔÈ»ÊDz»ºÏÀíµÄ£¬ÒòΪһ´ÎÉÏ´«¶à¸ö£¬¾ÍÒâζ×ÅÊýÁ¿²»È·¶¨¡£Òò´ËÎÒÃǾÍÒªÈÃÕâЩÎļþÉÏ´«¿ò¶¯Ì¬Ìí¼Ó£¬ÏÂÃæÎÒÒÔÎÒ×öµÄÒ»¸öͼ¿â¹ÜÀíÖеÄÉÏ´«Í¼Æ¬µÄ¹¦ÄÜΪÀý
ÏÈ¿´Ð§¹û£º
´ò¿ªµÄ³õʼ½çÃ棺
ĬÈÏ ......

asp.netĸ°åÒ³ÒýÓÃÎļþµÄ·¾¶ÎÊÌâ

1. ͼƬÎÊÌâ
·Ç³£ºÃ½â¾ö
<img runat="server" src="~/images/ad468x60.gif" alt="" />
¼ÓÉÏrunat="server" £¬Â·¾¶Ê¹Óþø¶Ô·¾¶~/»ù±¾ÉϾÍOKÁË¡£
2. CSSÎļþÒýÓÃ
<link rel="stylesheet" type="text/css" href="style.css" />
ÕâÀïÉñÆæµÄ¾ÍÊÇlinkµÄÎļþµÄhrefÊÇËæ×ű»·ÃÎÊÎļþµÄĿ¼½á¹¹×Ô¶¯µ÷Õû£¬Ëµ°×Á˾ ......

ASP.NET MVC ÈëÃÅ5¡¢ViewÓëViewData

viewÔÚMVCģʽÖÐÓëÓû§½øÐÐ×îÖ±½ÓµÄ½Ó´¥£¬Ëü¸ºÔðÊý¾ÝµÄ³ÊÏÖ¡£ÕâÀïҪעÒâÒ»µã¾ÍÊÇ£¬viewÖ»ÊǸºÔðÊý¾ÝµÄ³ÊÏÖ£¬ËùÒÔÎÒÃÇÓ¦¸ÃÒª¾¡Á¿ÈÃ
viewÖв»Éæ¼°ÒµÎñÂß¼­µÄ´¦Àí¡£
ÎÒÃÇÀ´Ìí¼ÓÒ»¸öBlogÊ×Ò³µÄview¡£ÔÚ°²×°ÁËASP.NET MVCºó£¬ÎÒÃÇÔÚÌí¼ÓÐÂÏîÄ¿µÄʱºò¿ÉÒÔ¿´µ½ÓÐMVCµÄviewÄ£°å£º
 
×¢£ºÈç¹ûÄãµÄÊÇÖÐÎÄ°æ
µÄVS£¬°²×°Íêºó¿ ......

ASP.NET MVC ÈëÃÅ7¡¢HellperÓëÊý¾ÝµÄÌá½»Óë°ó¶¨

ASP.NET
MVCÌṩÁ˺ܶàHellperµÄ·½·¨£¬Hellper¾ÍÊÇһЩÉú³ÉHTML´úÂëµÄ·½·¨£¬·½±ãÎÒÃÇÊéдHTML´úÂë(ÓÐÒ»²¿·ÖµÄÅóÓѸüϲ»¶Ö±½ÓдHTML
´úÂë)¡£ÎÒÃÇÒ²¿ÉÒÔÀûÓÃ.NET 3.5µÄÀ©Õ¹·½·¨À´ÊéдÎÒÃÇ×Ô¼ºµÄHellper¡£
ÀýÈ磺
<%
=
Html.ActionLink(
"
Ê×Ò³
"
,
"
index
"
,
"
Home
" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ