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

»ùÓÚIPagedList µÄ Asp.Net MVC ·ÖÒ³

ÉÏ´Îд¹ýһƪMVC·ÖÒ³µÄ
×Ô¼ºÓõÄÒ»¸öASP.Net MVC·ÖÒ³ÄóöÀ´·ÖÏíÏÂ
ÏÖÔÚ·¢Ò»¸ö¸Ä½ø°æ
ÀïÃæÓõ½µÄIPagedListÎÒ×Ô¼ºÒ²¼Ç²»ÇåÊÇ´ÓÄÄÀïCOPYÀ´µÄÁË¡£ºÇºÇ
ÕâÀïÎҾͲ»°ÑIPagedListµÄ´úÂëÌù³öÀ´ÁË£¬ÒªÊ¹µÄÏÂÔØDEMO×Ô¼ºÄðɡ£
ºǫ́¶ÔÊý¾ÝµÄ·ÖÒ³
public ActionResult Index([DefaultValue(1)]int p,[DefaultValue(10)]int pagesize)
        {
            var model = Database.List.OrderByDescending(z=>z.Id).ToPagedList(p-1,pagesize);
            return View("Index",model);
        }
 
¸öÈË×î½ü±È½Ïϲ»¶Ê¹ÓÃDefaultValue
µ±È»Ò²¿ÉÒÔд³É
public ActionResult Index(int? p,int? pagesize)
        {
            p = p ?? 1;
            pagesize = pagesize ?? 10;
            var model = Database.List.OrderByDescending(z=>z.Id).ToPagedList(p-1,pagesize);
            return View("Index",model);
        }
ÕâÀïToPagedList Õâ¸öÀ©Õ¹·½·¨ÀïµÚÒ»¸ö²ÎÊýÊÇindex
ÀÁµÃÈ¥¸Ä³ÉpageÁË£¬ËùÒÔ¾ÍÓÃÁË p-1
ǰ̨Öе÷ÓÃ
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcDemo.IPagedList<MyModel>>" %>
 
    <%= Html.PagerBar(ViewData.Model) %>
    <table>
        <thead>
        <tr>
            <th>Id</th>
            <th>ÐÕ?Ãû?</th>
            <th>ÓÊ&


Ïà¹ØÎĵµ£º

ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ¡£

ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ
Ô­±¾ÒÔΪÓÃÕâÖÖ·½Ê½£¬°Ñ´Ë·½·¨·Åµ½Ò»¸öHttphandlerÖУ¬È»ºó´ÓJAVASCRIPT·ÃÎÊHttphandlerÀ´ÊµÏÖÎÞˢеÄÎļþÉÏ´«¡£Ã»Ïëµ½£¬ÕâÑùͬÑùÊDz»Ðеģ¬Ö»ÄÜÔÚ±¾»ú²âÊÔͨ¹ý£¬Èç¹û·Åµ½ÍøÉÏ£¬»òÕß´ÓÆäËûµØ·½·ÃÎʾͻáÌáʾÎÞ·¨ÕÒµ½Îļþ£¬¿É¼ûÔÚASP.NETÖÐËüÖ»ÄÜÓÃÓÚÉÏ´«·þÎñÆ÷¶ËµÄÎļþ¡£ 
֮ǰÔÚÍøÕ¾Ò²Ë ......

ASP.NET Cache_µÚÁùƪ_»º´æ×ܽá

ÔÚASP.NETÏÂʹÓûº´æ¼¼Êõ£¬ÎÒ¸öÈ˾õµÃÓÐÒÔϼ¸µã£º
1) Ìá¸ßÓ¦ÓóÌÐòÐÔÄܵÄÊÖ¶ÎÔÚÓ¦ÓóÌÐò¿ª·¢µÄ¸÷¸ö½×¶Î¶¼ÄÜÌåÏÖ³öÀ´£¬¼ÈÓÐСϸ½Ú£¬ÓÖÓдó·½Ïò¡£±ÈÈ磬±£Ö¤Éè¼ÆÒ»¸öºÃµÄÈí¼þÂß¼­½á¹¹£»±£Ö¤Ê¹ÓÃÒ»¸öºÏÊʵÄÊý¾Ý½á¹¹£¬ÊǼ¯ºÏ¡¢Ê÷Ðνṹ£¬»¹ÊÇÁ´±í¡£·²ÊdzÌÐò¶¼ÊÇÓÉÊý¾Ý½á¹¹×é³ÉµÄ£¬Ò»Ì¸µ½Êý¾Ý½á¹¹¾ÍÒ»¶¨»áÉæ¼°µ½Êý¾ÝµÄ²åÈ롢ɾ ......

ASP.NETÊý¾Ý°ó¶¨_µÚһƪ_¸ÅÊö

+++ ÊÂʵÉÏ£¬½«Êý¾Ý¼¯°ó¶¨µ½.NET¿Ø¼þ£¬¾ÍÊǽ«Êý¾Ý¿âµÄ±í»ò±íÖÐij¸ö×ֶζÁµ½ÄÚ´æµÄij¸ö½á¹¹À±ÈÈçDataTable£¬È»ºó°ÑÕâ¸öÊý¾Ý½á¹¹°ó¶¨µ½.NET¿Ø¼þ¡£
+++ Èç¹ûÄãÒÔǰʹÓùýC++ Builder»òÊÇDelphi£¬ÄÇôÄãÒ»¶¨¼ÇµÃ£¬°ó¶¨Êý¾Ý¿â¿Ø¼þÓëÒ»°ã¿Ø¼þÊÇ·Ö¿ªµÄ£¬ÕâÁ½ÖֿؼþÔÚ²»Í¬µÄ°üÖС£¶øÏÖÔÚµÄ.NET¿Ø¼þ¾Í·Ç³£Áé»î£¬Ëü¼È¿ÉÒÔ×÷Ϊһ°ã ......

ÀûÓÃCache£¬asp.net ¼òµ¥ÊµÏÖ¶¨Ê±Ö´ÐÐÈÎÎñ

private
 
static
 CacheItemRemovedCallback OnCacheRemove 
=
 
null
;
protected
 
void
 Application_Start(
object
 sender, EventArgs e)
{
    AddTask(
"
DoStuff
"

60
);
}
private
 
vo ......

Asp.net MVC2ѧϰ±Ê¼Ç5 ¼òµ¥ÊµÀý(Movie)(ÉÏ)


Ç°Ãæ¶Ôroute¡¢controller¡¢view ÒѾ­ÓÐÁË»ù±¾µÄÁ˽⣬½ñÌìÎÒÃǾÍÀ´Ò»¸ö¼òµ¥µÄʵÀý -- Movie
¿ªÊ¼Ö®Ç°£¬¼òµ¥ËµÒ»Ï model(Ä£ÐÍ)£¬ÏàÐÅ´ó¼Ò×ö·Ö²ã¿ª·¢µÄʱºòÒ»¶¨ÓùýËü£¬MVCµÄmodelºÍËûÒ»Ñù£¬
ÿһ¸ömodel ¶ÔÓ¦Êý¾Ý¿âÒ»ÕÅ±í£¬ÕâÑùÎÒÃǾÍÊÇÓÃmodelµÄÊôÐÔ·ÃÎʱíÖÐÿһÐмǼµÄijһÁÐÖµ¡£
mvcÖÐÄã¿ÉÒÔ×Ô¼ºÐ´model£¬Ò²¿ÉÒÔʹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ