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

ASP.NET MVC ѧϰÌù

1. µ±ÔÚÒ»¸ö Action ÖÐ ¶ÔÏàͬ¹¦ÄܵÄ2¸ö¿Ø¼þ½øÐи³Öµ 
     List<SelectListItem> WebSite = GetWebSite();
ViewData["SiteNames"] = WebSite;
if (WebSite.Count > 0)
WebSite.RemoveAt(0);
ViewData["SiteName"] = WebSite;
   Ò³ÃæÏÔʾʱ»áͳһÒÔ WebSite ÖеÄÄÚÈÝÏÔʾ¡£ BUG¡¡£¿£¿£¿
¡¡ÈçÐèÕý³£ÏÔʾ¡¡ÔòÐèÿ¸öµ¥¶ÀÈ¡Öµ
2. ÔÚaction ÖÐʵÏÖÒ³Ã浯³öÌáʾ 
  
   MVCÖÐûÓÐÏñ 2.0ÖÐ ºǫ́ע²áǰ̨½Å±¾µÄ¹¦ÄÜ¡£
   ½â¾ö°ì·¨£º ½«ÌáʾÐÅÏ¢·Åµ½ TempData ÖУ¬È»ºóǰ̨д¶ÔÓ¦ javascript º¯Êý¡£Èç·Å ViewData ÖÐ ÔòÌøתAction ºóÊý¾Ý¶ªÊ§
  


Ïà¹ØÎĵµ£º

asp.netµ¼³ö³ÉEXCEL

ÒÔÏÂÊǵ¼³öµÄ·½·¨£º
public static void ToExcel(System.Web.UI.Control ctl)
    {
        //HttpContext.Current.Response.Charset   ="GB2312";  
        HttpContext.Current.Response.Charset = "G ......

asp.net¿ª·¢³£Óü¼ÇÉ

1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("<script>window.open
('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes.Add("o ......

ASP.NET Á¬½ÓÊý¾Ý¿â

Õâ¸ö¶«Î÷Ì«¾À½áÁË~Ìù³öÀ´´úÂ룬¹©´ó¼ÒÏíÓÃ
·ÖÈý¸ö²¿·Ö£º.config    .aspx      .aspx.cs
//web.config
<appSettings>
<add key="keystring" value="Data Source=ZRQ-PC;Initial Catalog=OnlineJudge;Integrated Security=True"/>
</appSettings>
......

ASP.NET 2.0ÖÐGridViewÎÞÏ޲㸴ÔÓ±íÍ·µÄʵÏÖ

ʵÏÖ·½·¨¾ÍÊǸøµ¥Ôª¸ñÌî³äÎÒÃÇÏëÒªµÄ¸ñʽ´úÂë¡£
 
 
==============C#==============
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script run ......

ASP.NET ÖпؼþµÄEnableViewState

ÔÚASP.NetÖжԸ÷¸öWebForm¿Ø¼þÒýÈëÒÔǰûÓеÄEnableViewStateÊôÐÔ¡£Õâ¸öÊôÐÔ¾¿¾¹ÓÐʲôÓá£ÎÒÃÇÖªµÀ¶ÔÓÚWebForm¶øÑÔ£¬Æä´úÂëÊÇÔÚ·þÎñÆ÷¶ËµÄ£¬ÒÔ´¦Àí¿Í»§¶ËµÄÇëÇó¡£µ±Óû§Í¨¹ýä¯ÀÀÆ÷ä¯ÀÀÍøÒ³µÄʱºò£¬»á¶ÔÍøÒ³½øÐÐijЩ²Ù×÷£¬±ÈÈç´ò¿ªÐÂÁ´½Ó£¬»òµ¥»÷ij¸ö°´Å¥¡£ÔÚASPÖУ¬ÕâЩÊÇͨ¹ý½Å±¾ÓïÑÔ¶ÔÆä½øÐд¦Àí£¬Ö®ºóÔÙ´«µÝ¸ø·þÎñÆ÷¶Ë¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ