ÈÃASP.Net HTMLÒ³Ãæ´úÂë ÇåˬÆðÀ´
	
    
    
	×Ô´ÓÓÃÁË ASP.Net MVCºó¾Íϲ»¶ÉÏÁËËü £¬ÒòΪMVC¶Ô·þÎñÆ÷¿Ø¼þµÄÒÀÀµ´ó´ó¼õÉÙ£¬ËüÉú³ÉµÄHTMLÒ³Ãæ¾Í±ÈWebFormÇåˬ¶àÁË£¬¼ÓÔØËÙ¶ÈÓÐÁËÃ÷ÏԵĸÄÉÆ¡£
µ«¶ÔÓÚÒ³ÃæÖÐÄÚǶscript£¬»¹ÊDz»Äܳ¹µ×µÄ±ÜÃ⣬È磺
 <script type="text/javascript" language="javascript">
 //<!--  
 function DepositPage() {     
     // ÕâÊÇÒ»¸öµÚ3·½µÄWebControl,ÓÉÓÚÊÇ·þÎñÆ÷¿Ø¼þ£¬ÊÜMasterPageÓ°Ïì,ËüµÄ¿Í»§¶ËID²¢²»ÊÇÈ·¶¨µÄ¡£  
     this.ctrlRadGrid = "#<%= ctrlRadGrid.ClientID %>";  
       
     // ÕâÊÇÒ»¶ÎÓÖ³ôÓÖ³¤µÄJSON£¬´ÓModalÖд«µÝ¹ýÀ´  
     this.accounts = <%= Modal.JSON %>;  
     // .............................  
 }  
 new DepositPage();  
 // -->
 </script>  
ÊÇ·ñÓÐÒ»ÖÖ·½·¨¿ÉÒÔ½«Õâ¶ÎJS²»ÄÚǶÔÚHTMLÖУ¬Ê¹ÓÃ<script src="">±ê¼Ç´ÓÍⲿÎļþ¼ÓÔØ? 
´ð°¸Êǿ϶¨µÄ£¬Í¨¹ý×Ô¶¨ÒåWebControlÍêÈ«¿ÉÒÔʵÏÖ£¬ÓÐÈçÏÂWebControl
    using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
[ParseChildren(false)]
public class ExternalJavascriptControl : WebControl
{
private string SafeFilenamePrefix
{
    get
    {
	return Regex.Replace( this.ClientID
	 , "(\\\\|\\/|\\:|\\*|\\?|\\\"|\\<|\\>|\\|)"
	 , "_"
	 , RegexOptions.ECMAScript | RegexOptions.Compiled
	 );
    }
}
protected override void Render(HtmlTextWriter writer)
{
    if (!Visible)
	return;
    try
    {
	using (StringWriter sw = new StringWriter())
	{
	    using (HtmlTextWriter htw = new HtmlTextWriter(sw))
	    {
		base.Render(htw);
		// get the rendered content    
		string rendered = sw.ToString();
		// remove the script tag if exist    
		rendered = Regex.Replace(rendered
		    , @"(<[\s\/]*script\b[^>]*>)"
		    , string.Empty
		    , RegexOptions.ECMAScript | RegexOptions.Compiled | RegexOptions.IgnoreCase
		    );
		// get the file pa
    
     
	
	
    
    
	Ïà¹ØÎĵµ£º
        
    
    EvalÊÇasp.net1.1Öг£
Óõİó¶¨Óï·¨£¬ËüÊÇ“µ¥Ïò”µÄ£¬¼´°ó¶¨Ê±°ÑÊý¾ÝÔ´ÉÏÏàÓ¦µÄÖµ¸³µ½¸Ã¿Ø¼þÉÏ£¬EvalµÄÈÎÎñ¾ÍÍê³ÉÁË 
¶øBindËùνµÄ“Ë«Ïò”¾ÍÊÇ£ºÔÚ°ó¶¨Ê±£¬°Ñ
Êý¾ÝÔ´ÉÏÏàÓ¦µÄÖµ¸³µ½¸Ã¿Ø¼þÉÏ£¬²¢ÇÒ£¬ÔÚÌύʱ£¬×Ô¶¯ÌáÈ¡Óû§ÔڸÿؼþÉÏÊäÈëµÄÖµ¡£
Code
<
EditItemTemplate
>
 
&nb ......
	
    
        
    
    ËÆË®Á÷Ä걨¸æÁË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ÏîÄ¿µÄÇ¨ÒÆ×¼±¸ºÃ¹¤¾ß£¬Ö÷Òª¹¤×÷¾ÍÊÇת»¯ÏîÄ¿ÀàÐÍ£¬¸üгÌÐò¼¯µÄÒýÓúÍÉú³ÉÅäÖÃÐ ......
	
    
        
    
    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";
           ......
	
    
        
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta NAME="Copyright" CONTENT="">
<meta http-equiv="Content-Type" content="text/html; charset=u ......
	
    
        
    
    ×î½ü¹«Ë¾ÐèÒª¿ª·¢Ò»¸ö¼òÀúµ¼È빦ÄÜ£¬ÀàËÆ²©¿Í°á¼Ò»òÕßÓÊÏä°á¼Ò£¬Ö®Ç°×¥È¡ÐÅÏ¢ÊÇÀûÓû𳵲ɼ¯Æ÷£¬µ«ÊǼòÀúµ¼È빦ÄÜÐèÒªÓû§µÇ½ÒÔºó²ÅÄÜ»ñÈ¡¼òÀúÊý¾Ý£¬ÎÞÄÎÖ»ºÃ×Ô¼º¿ª·¢ÁË¡£
Ê×ÏÈÊÇÓöµ½µÄÎÊÌâÊÇ£ºÈçºÎʵÏÖÄ£ÄâµÇ½£¿
ÎÒÃÇÖªµÀÒ»°ãµÄÍøÕ¾¶¼ÊÇͨ¹ýCookiesÀ´Î¬»¤×´Ì¬µÄ£¬ÎÒ×¥µÄÍøÕ¾Ò²ÊÇÖ§³ÖÀûÓÃCookiesÀ´ÑéÖ¤Óû§µÄ£¬¹¹ÔìÒ»¸ö ......