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ÉÓÃÏÂÃæ´úÂëÊÔÑéÒ»ÏÂASP.NETÒ³ÃæˢУº
Response.Write(" < script lan
Ïà¹ØÎĵµ£º
ÔÚÍøÂç¾³£¿´µ½ÍøÕ¾±»¹ÒÂí¡¢Ö÷Ò³±»Ð޸ĵÄÐÂÎÅ£¬ÆäʵÕâЩÎÊÌâ¿ÉÄÜÊǶ෽ÃæµÄ£¬·þÎñÆ÷£¬ÍøÕ¾³ÌÐòµÈµÈ¡£¡£¡£µ«ÊÇÏÖÔÚÒç³öÒѾ±»ÈËÃÇÖØÊӺͷþÎñÆ÷µÄ²»¶ÏÍêÉÆ£¬·þÎñÆ÷ϵͳ©¶´Ò²²»ÊÇÄÇôÈÝÒ×·¢¾ò£¬µ±È»Ò²Òª±£Ö¤µÚÈý·½µÄÈí¼þ°²È«¡£
×öÏîÄ¿Ò²ÓÐÒ»¶Îʱ¼äÁË¡£ÔÚ³ÌÐòÖÐÒ²Óöµ½ºÜ¶à°²È«·½ÃæµÄÎÊÌâ¡£Ò²¸Ã×ܽáÒ»ÏÂÁË¡£Õâ¸öÏîÄ¿ÊÇÒ»¸öCMSÏ ......
private void btnUploadPicture_Click(object sender, System.EventArgs e) { //¼ì²éÉÏ´«ÎļþµÄ¸ñʽÊÇ·ñÓÐЧ if(this.UploadFile.PostedFile.ContentType.ToLower().IndexOf("image") < 0) { Response.Write("ÉÏ´«Í¼Æ¬¸ñʽÎÞЧ£¡"); return; } //Éú³ÉÔͼ Byte[] oFileByte = new byte[this.UploadFile.PostedFile.Conte ......
asp.net¿ª·¢µÄÅóÓÑ£¬¾³£Óõõ½web.configÎļþµÄÅäÖã¬ËùÒÔÎÒÃÇÌØÕûÀíÁËÖÐÎÄ˵Ã÷¡£
<?xml version="1.0" standalone="yes"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!--ÅäÖÃÈ«¾Ö±äÁ¿-->
<appSettings>
<add key="examstr" value="server=.;da ......
ÔÚÉÏһƪ²©ÎÄ¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÖеÄÉí·ÝÑéÖ¤ËäÈ»ºÜ¼òµ¥£¬µ«ÊÇÓÐÒ»¸öȱµã£¬¾ÍÊÇ·ÃÎÊÕû¸öÍøÕ¾¶¼±ØÐëÒª¾¹ýÉí·ÝÑéÖ¤£¬¶øÊÂʵÉÏ£¬ºÜ¶àÍøÕ¾¶¼²»»áÕâôҪÇóµÄ¡£
±ÈÈçÒ»¸öÐÂÎÅϵͳ£¬Í¨³£Ö»ÓÐÔÚ·¢²¼ÐÂÎŵÄÍøÒ³²ÅÐèÒªÉí·ÝÑéÖ¤£¬¶øÓû§ä¯ÀÀÐÂÎÅÊDz»ÐèÒªÉí·ÝÑéÖ¤µÄ¡£¶ÔÓÚÕâÖÖÇé¿ö£¬¾ÍÒªÕë¶Ô²»Í¬µÄÍøÒ³À´½øÐÐÉí·ÝÑé ......
һλCSDNÍøÓÑ·ÅÔÚÏÂÔØÀïµÄ
/////////////////
/// <summary>
/// ·ÖÒ³º¯Êý
/// </summary>
/// <param name="dtRecord">Êý¾ÝÔ´</param>
private void SplitPage(DataTable dtRecord) ......