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

Asp.NetÏÂͨ¹ýÇл»CSS»»Æ¤·ô

Ö±½ÓÖØÐ´Renderʼþ
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            StringWriter sw = new StringWriter() ;
            HtmlTextWriter htmlWriter = new HtmlTextWriter(sw) ;
            base.Render(htmlWriter) ;
            //µ±Ç°Óû§Ñ¡ÔñµÄ·ç¸ñcss
            string css = "<link href=\"css url\" rel=\"stylesheet\" type=\"text/css\">" ;
            string html = sw.ToString() ;
            int startPoint = html.IndexOf("</head>", StringComparison.CurrentCultureIgnoreCase);
            if (startPoint > 0)
            {
                html = html.Insert(startPoint, css);
            }
            writer.Write(html) ;
        }
°ÑÕâ¸ö·ÅÔÚÿ¸öÒ³ÃæµÄ»ùÀàPageBaseÀï¡£ÄǾͷ½±ã¶àÁË¡£
µ±È»£¬Èç¹û²»ÏëÔÚÈÃÿ¸öpage¶¼¼Ì³Ð×Ô¶¨ÒåµÄ»ùÀàµÄ·½Ê½£¬ÄÇÒ²¿ÉÒÔͨ¹ýÔÚHttpModuleÀïд¡£Ò²ºÜ·½±ã.
Ò»´¦Ð´ºÃ£¬Ò³Ò³ÊÜÓÃѽ
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/21aspnet/archive/2009/02/02/3858024.aspx


Ïà¹ØÎĵµ£º

ASP.NETÉú³É¾²Ì¬Ò³ÃæµÄ·½·¨

ʹÓÃASP.NETÉú³É¾²Ì¬Ò³ÃæµÄ·½·¨ÓÐÁ½ÖÖ£¬µÚÒ»ÖÖÊÇʹÓÃC#ÔÚºǫ́Ӳ±àÂ룬µÚ¶þÖÖÊǶÁȡģ°åÎļþ£¬Ê¹ÓÃ×Ö·û´®Ìæ»»µÄ·½·¨¡£µÚÒ»ÖÖ·½·¨±àÂëÁ¿´ó£¬
¶øÇÒά»¤±È½ÏÀ§ÄÑ¡£ÎÒÖØµã½²½âµÚ¶þÖÖ·½·¨¡£µÚ¶þÖÖ·½·¨µÄ»ù±¾Ë¼Â·ÊÇ£ºÊ¹ÓÃDWÖ®ÀàµÄ¹¤¾ßÉú³ÉÒ»¸ö¾²Ì¬Ò³ÃæÄ£°å¡£¶ÁÈ¡¸ÃÄ£°åÎļþ£¬È»ºó¶ÔÀïÃæµÄÌØÊâ±ê¼ÇʹÓÃ
ÕæÊµµÄÊý¾ÝÌæ»»µô£¬²¢Éú³ÉÒ ......

asp.netÎļþ²Ù×÷Àà

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using  ......

ASP.NET×Ô¶¯Éú³É¾²Ì¬HTMLÍøÒ³, ÔÙ°´ÈÕÆÚ´æ·ÅĿ¼

һ˵µ½ÐÂÎÅϵͳµÄ»°£¬Ò»¶¨»á̸µ½¾²Ì¬Ò³ÃæÉú³ÉµÄ£¬ÒòΪ¾²Ì¬Ò³Ãæ²»µ«ÊǶÁÈ¡Ëٶȿ죬¶øÇÒÓÖ°²È«£»
¾²Ì¬Ò³ÃæµÄÉú³É²»¹ÜÊÇСµ½ÏÖÔ򵀮óÒµÍøÕ¾´óÖÁÍøÒ×£¬£Ñ£ÑµÈÃÅ»§¶¼Óõ½ÁË£»
ÄÇôÎÒÃÇÈçºÎÀ´Éú³É¾²Ì¬Ò³ÄØ£¿
ÒÔʲô·½Ê½Éú³É¾²Ì¬Ò³ÃæÄØ……
ÔÚÉú³É¾²Ì¬Ò³ÃæµÄʱºòÓÐÄÇЩÊÇҪעÒâµÄÄØ£º
¾²Ì¬Ò³ÃæÃüÃû
ͳһ´æ·ÅĿ¼ ......

asp.netÎļþºÍÎļþ¼ÐѹËõ

·¨Ò»£ºµ÷ÓÃwinrar
using Microsoft.Win32;
using System.Diagnostics;
protected void Button1_Click(object sender, EventArgs e)
    {
        RAR(@"E:\95413594531\GIS", "tmptest", @"E:\95413594531\");
    }
    /// ......

asp.net´°ÌåµÄ´ò¿ªºÍ¹Ø±Õ

asp.net´°ÌåµÄ´ò¿ªºÍ¹Ø±Õ
//´ò¿ªÐµĴ°Ìå
Response.Redirect("WebMain.aspx");   
//µ¯³öÒ»¸öд°Ìå
Response.Write("<script>window.open(\"WebMain.aspx\")</script>")
//µ¯³öÒ»¸öÖ»ÓÐÈ·¶¨°´Å¥µÄÌáʾ¿ò
Response.Write("<script>alert(\"Óû§Ãû»òÃÜÂë´íÎó\");</script>") ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ