ASP.NETÒ³ÃæË¢Ð·½·¨´ó¼¯ºÏ
ÏÈ¿´¿´ASP.NETÒ³ÃæË¢ÐµÄʵÏÖ·½·¨£º
¡¡¡¡µÚÒ»£º
¡¡¡¡C# code
¡¡¡¡private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); }
¡¡¡¡µÚ¶þ£º
¡¡¡¡C# code
¡¡¡¡private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.location.href=document.URL; < /script>" ); }
¡¡¡¡µÚÈý£º
¡¡¡¡C# code
¡¡¡¡private void Button3_Click( object sender, System.EventArgs e ) { Response.AddHeader( "Refresh","0" ); }
¡¡¡¡µÚËÄ£º
¡¡¡¡C# code
¡¡¡¡private void Button6_Click( object sender, System.EventArgs e ) { //ºÃÏñÓÐЩ²»¶Ô£¿ //Response.Write( " < script language=javascript>window.location.reload( ); < /script>" ); }
¡¡¡¡µÚÎ壺
¡¡¡¡HTML code
¡¡¡¡< script>< !-- var limit="3:00" if ( document.images ) { var parselimit=limit.split( ":" )parselimit=parselimit[0]*60+parselimit[1]*1 } function beginrefresh( ) { if ( !document.images )returnif ( parselimit==1 )window.location.reload( )else { parselimit-=1curmin=Math.floor( parselimit/60 )cursec=parselimit%60if ( curmin!=0 )curtime=curmin+"·Ö"+cursec+"ÃëºóÖØË¢±¾Ò³£¡"elsecurtime=cursec+"ÃëºóÖØË¢±¾Ò³£¡"window.status=curtimesetTimeout( "beginrefresh( )",1000 ) } } window.onload=beginrefresh//--> < /script>< DIV style="Z-INDEX: 102; LEFT: 408px; POSITION: absolute; TOP: 232px" ms_positioning="text2D"> < P>< FONT size="3">×Ô¶¯Ë¢ÐÂÒ³Ãæ< /FONT>< /P> < /DIV>
¡¡¡¡µÚÁù£º
¡¡¡¡< meta http-equiv="refresh" content="300; url=target.html"> ÓÃwindow.location.hrefʵÏÖË¢ÐÂÁí¸ö¿ò¼ÜÒ³Ãæ
¡¡¡¡ÔÚдasp.net³ÌÐòµÄʱºò£¬ÎÒÃǾ³£Óöµ½Ìø×ªÒ³ÃæµÄÎÊÌ⣬ÎÒÃǾ³£Ê¹ÓÃResponse.Redirect £¬Èç¹û¿Í»§ÒªÔÚÌø×ªµÄʱºòʹÓÃÌáʾ£¬Õâ¸ö¾Í²»Áé¹âÁË£¬È磺
¡¡¡¡Response.Write(" < script>alert('¹§Ï²Äú£¬×¢²á³É¹¦£¡'); < /script>"); Response.Redirect("main.html"); ÕâʱºòÎÒÃǵÄÌáʾÄÚÈÝûÓгöÀ´¾ÍÌø×ªÁË£¬ºÍResponse.Redirect("main.html"); ûÓÐÈκÎÇø±ð¡£
¡¡¡¡ÕâʱÎÒÃDzÉÓÃÏÂÃæ´úÂëÊÔÑéÒ»Ï
Ïà¹ØÎĵµ£º
Application
1.ApplicationÓÃÀ´±£´æËùÓÐÓû§¹²ÓõÄÐÅÏ¢
2.ÔÚAspʱ´ú£¬Èç¹ûÒª±£´æµÄÊý¾ÝÔÚÓ¦ÓóÌÐòÉú´æÆÚÄÚ²»»á»òÕߺÜÉÙ·¢Éú¸Ä±ä£¬ÄÇôʹÓÃApplicationÊÇÀíÏëµÄÑ¡Ôñ¡£µ«ÊÇÔÚAsp.net¿ª·¢»·¾³ÖÐÎÒÃǰÑÀàËÆµÄÅäÖÃÊý¾Ý·ÅÔÚWeb.configÖС£
3.Èç¹ûҪʹÓÃApplication ҪעÒâµÄÊÇËùÓеÄд²Ù×÷¶¼ÒªÔÚApplication_OnStartʼþÖÐÍê³É ......
1.¶ÔIEä¯ÀÀÆ÷½øÐÐÉèÖÃ
Îļþ-¡µÒ³ÃæÉèÖÃ-¡µ½«ÀïÃæµÄҳüºÍÒ³½ÅµÄÄÚÈÝÇå¿Õ ¾ÍOKÁË
2.Ò³Ãæ´úÂëʵÏÖ Javascript
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><!-- & ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Timers;
using System.Data;
using System.Data.SqlClient;
namespace SMS_joke
{
/// <summary>
/// Global µÄժҪ˵Ã÷¡£
/// </summary>
public class ......
ASP.NET(C#)·µ»ØÉÏÒ»Ò³(ºóÍË)´úÂë
2008-08-10 10:32
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["BackUrl"] = Request.UrlReferrer.ToString();
}
}
/// <s ......
asp.net ¿ª·¢Öг£ÓõÄһЩ·½·¨×ܽáËäȻдµÄ²»ºÃ,µ«ºÜʵÓÃ
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Net;
using System.Text.RegularExpressions;
using System.Web.UI;
using System.Web.SessionState;
using System.Web.UI.WebControls;
using Syst ......