Asp.net MVC2 ʹÓþÑ飬ÐÔÄÜÓÅ»¯½¨Òé
1.¹ØÓÚ»º´æ
»º´æÉÏ£¬Êý¾Ý²ãÉϵĻº´æÊDZØÐëµÄ£¬Õâµã²»±Ø¶à˵ÁË¡£
ÁíÒ»¸öºÜÖØÒªµÄÊÇ£ºÊÓͼƬ¶Î»º´æ¡£
ÎҲο¼ÁËÀÏÕÔµÄдµÄÈýƪ¹ØÓÚƬ¶Î»º´æµÄÎÄÕ£º
ÊʺÏASP.NET MVCµÄÊÓͼƬ¶Ï»º´æ·½Ê½£¨ÉÏ£©£ºÆð²½
ÊʺÏASP.NET MVCµÄÊÓͼƬ¶Ï»º´æ·½Ê½£¨ÖУ©£º¸üʵÓõÄAPI
ÊʺÏASP.NET MVCµÄÊÓͼƬ¶Ï»º´æ·½Ê½£¨Ï£©£ºÒ³ÃæÊä³öÔÔò
±¾ÏëÓÃÀÏÕÔµÄÁË£¬µ«ÊÇÎÒ·¢ÏÖAsp.net MVC2 µÄÓÐÒ»¸öй¦ÄÜ£º Html.Partial¿ÉÒÔ·µ»ØÉú³ÉµÄHTML, ·µ»ØµÄÀàÐÍÊÇ£ºMvcHtmlString. ËäȻҪÀûÓÃPartial View²ÅÄÜÉú³ÉHtmlƬ¶Î£¬µ«ÊÇÎÒÏëÕâ¸öÒѾ¹»ÎÒÓõÄÁË£¬ËùÒÔÎÒ×öÁËÒ»¸öÕâÑùÒ»¸öHelper£¬Ö÷ÒªÊǽ«Éú³ÉµÄHTMLƬ¶Î»º´æµ½MemcachedÀï¡£´úÂëÈçÏ£º
public static class MvcHtmlHelper
{
public static MvcHtmlString MemcacheHtmlPartial(this HtmlHelper htmlHelper,int duration, string partialViewName, object model, ViewDataDictionary viewData)
{
object obaear = htmlHelper.ViewContext.RouteData.DataTokens["area"];
string area=string.Empty;
if (obaear != null) area = obaear.ToString();
string key = string.Format("MemcacheHtmlPartial_{0}{1}", area, partialViewName);
object ob = DistCache.Get(key);
if (ob == null)
{
MvcHtmlString mstr = htmlHelper.Partial(partialViewName, model, viewData);
DistCache.Add(key, mstr.ToString(), TimeSpan.fromSeconds(duration));
Ïà¹ØÎĵµ£º
×î½ü×ö¸öÏîÄ¿£¬ÐèÒªµ¼³öexcel£¬ÒªÖ÷´Ó±íÒ»Æðµ¼³öµÄ£¬¾Í´óÖÂдÁËÒ»¸ö·½·¨£¬¿ÉÄܸñʽ·½Ã滹ÊÇ»á½øÐÐÐ޸ģ¬ÏÈÌù³öÀ´·½±ãÒÔºó²é¿´
ÏîÄ¿ÒýÓÃ΢ÈíexcelµÄcomµÄdll¼´¿É
/// <summary>
/// ¹¦ÄÜ£ºµ¼³öÎļþ£¨Í¨¹ýÊý¾ÝÔ´µ¼³ö,¿ÉÖ÷´Ó±íµ¼³ö£©
/// </summary>
/// <param name="strTitle" ......
Õâ¸öÐèÒªµ½ gougou ÉÏÕÒһϠJMail °²×°ÅäÖÃÒ»ÏÂ
°²×°
[¸úʹÓñð¸ö×é¼þÒ»Ñù£¬ÔÚʹÓÃJmailÓʼþ×é¼þ֮ǰҪÏÈ°²×°»ò×¢²á¸Ã×é¼þJmail.dll¡£
¾ßÌå×¢²á·½·¨£¬ÊÇÏÈ°ÑJmail.dllÎļþ¿½±´µ½Ó²Å̵ÄijһĿ¼Ï£¨ÈçC:\Jmail\Jmail.dll£©
È»ºóÖ´ÐÐÃüÁîRegsvr32 C:\Jmail\Jmail.dll¼´¿É]
ÉÏÔ´Âë
using System;
using System.Data;
......
+++ ÔÚWebÓ¦ÓóÌÐò¿ª·¢ÖУ¬»º´æ¶ÔÓ¦ÓóÌÐòÐÔÄܵÄÌá¸ßÓкܴó°ïÖú¡£±ÈÈ磬ÔÚͬһ¸öÓ¦ÓÃÖУ¬¾³£·¢Éú¶ÔͬһÊý¾Ý¡¢Âß¼¹¦ÄܺÍÓû§½çÃæµÄ¶à´ÎÇëÇó¡£µ±Óû§µÄ»ùÊýºÜ´óʱ£¬Èç¹ûÿ´ÎµÄÇëÇ󶼽øÐд¦Àí£¬Ôò»áÏûºÄºÜ¶àµÄ·þÎñÆ÷×ÊÔ´¡£ÁíÍ⣬ÓÐʱ·þÎñÆ÷ÌṩµÄÊý¾Ý·þÎñ¿ÉÄÜ»áÒâÍâµØÍ£Ö¹£¬Ê¹Óûº´æ¼¼Êõ¿ÉÒÔÔÚÒ»¶¨Ê±¼äÄÚÈÔÈ»Õý³£µØÌṩ¶Ô×îÖ ......
+++ Äã¿ÉÒÔÔÚÓ¦ÓóÌÐòÖÐʹÓÃCache¶ÔÏó·ÃÎÊ»º´æÏʹÓÃCache¶ÔÏóµÄInsert·½·¨½«Ò»¸ö»º´æÏîÌí¼Óµ½Ó¦ÓóÌÐò»º´æÖУ¬¸Ã·½·¨ÓкܶàÖØÔØ·½·¨£¬ÈÃÄãÓò»Í¬µÄ»º´æ²ßÂÔ½«Ò»¸ö»º´æÏîÌí¼Óµ½»º´æÖС£
+++ Èç¹ûÄãÓÃInsert·½·¨Ïò»º´æÖÐÌí¼Ó»º´æÏ²¢ÇÒ»º´æÖдæÔÚͬÃû»º´æÏÄÇô£¬»º´æÖеÄͬÃû»º´æÏ±»Ìæ»»£¨¸²¸Ç£©¡£
+++ ÄãÒ²¿ÉÒÔ ......
+++ Ò³Ãæ´úÂëÈçÏ£º
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="username" DataSourceID="SqlDataSource1"
PageSize="3">
<Columns>
  ......