Asp.net¶¯Ì¬¼ÓÔØÓû§×Ô¶¨Òå¿Ø¼þ,²¢×ª»»³ÉHTML´úÂë
AjaxÏÖÔÚÒѾÊÇÏ൱Á÷Ðеļ¼ÊõÁË£¬Ajax²»½öÊÇÏë·þÎñÆ÷¶Ë·¢ËÍÏûÏ¢£¬¸üÖØÒªµÄÊÇÎÞˢеÄÖØÔØÒ³Ãæ¡£
Èç¹ûÒ³Ãæµ¥´¿µÄʹÓÃjsÀ´´´½¨£¬ÒªÐ´´óÁ¿µÄ´úÂ룬¶øÇÒ²»Ö±¹Û¡£
ÔÚasp.netÖУ¬ÆäʵÎÒÃÇ¿ÉÒÔ´´½¨Óû§×Ô¶¨Òå¿Ø¼þ£¬Í¨¹ýAjaxÇëÇó·µ»ØÓû§×Ô¶¨Òå¿Ø¼þHTML´úÂë¡£
public static string RangerUsControl(string controlName)
{
StringBuilder build = new StringBuilder();
HtmlTextWriter htmlWriter = new HtmlTextWriter(new StringWriter(build));
UserControl uc = new UserControl();
Control ctrl=uc.LoadControl(controlName+".ascx");//¼ÓÔØÓû§¶¨Òå¿Ø¼þ
htmlWriter.Flush();
string result;
try
{
ctrl.RenderControl(htmlWriter);
}
catch { }
finally
{
htmlWriter.Flush();
result=build.ToString();
}
return result;//·µ»Ø¿Ø¼þµÄHTML´úÂë
}
Ïà¹ØÎĵµ£º
public static bool GetClientWeb()
{
bool result = false;
string clientType = string.Concat(HttpContext.Current.Request.UserAgent);
if (clientType.ToLower().Contains("mozilla") || clientType.ToLo ......
·þÎñÆ÷¶Ë½Å±¾¿é£º
<script runat="server">
int my = 10;
</script>
·ÖÉ¢µÄ½Å±¾
<%= my.ToString() %>
<% Response.Write(my); %>
.aspxÎļþµÄÄÚÈݱ»½âÎöÎ ......
ËÆË®Á÷Ä걨¸æÁËASP.NET MVC 2 Õýʽ·¢²¼£¬ÄÇôÎÒÃÇÓÐÐí¶àASP.NET MVC 1.0µÄ³ÌÐòÐèÒªÒÆÖ²µ½2.0Ôõô°ìÄØ£¿Eilon Lipton ÒѾ·¢²¼ÁËһƪ²©ÎÄ migration tool for converting ASP.NET MVC 1 application projects£¬ÎªÎÒÃǵÄVisual Studio 2008µÄMVCÏîÄ¿µÄÇ¨ÒÆ×¼±¸ºÃ¹¤¾ß£¬Ö÷Òª¹¤×÷¾ÍÊÇת»¯ÏîÄ¿ÀàÐÍ£¬¸üгÌÐò¼¯µÄÒýÓúÍÉú³ÉÅäÖÃÐ ......
´Ë´¦Ç¶ÈëµÄflashÀïÃæµÄͼƬÊÇ¿ÉÒÔËæÊ±·¢Éú¸Ä±äµÄͼƬ£¨¶¯Ì¬Í¼Æ¬£©
×¢ÒâÀ¶É«×ÖÌåµÄµØ·½£¬ÕâЩµØ·½¶¼ÒªÍ³Ò»
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="${ctx}/ui/Login/AC_RunActiveContent.js"
language="javascript"></script& ......
1. web.config
<connectionStrings>
<add name ="myconn" connectionString="Data Source=who\SQLEXPRESS; Initial Catalog=dbname;Integrated Security=True;" providerName="System.Data.SqlClient"/>
</connectionStrings>
2.
string htmlPath = "D:\\htmlFiles";
......