Request.Url方法
- private void Button1_Click( object sender, System.EventArgs e )
- {
- Response.Redirect( Request.Url.ToString( ) );
- }
Javascript方法
- private void Button1_Click( object sender, System.EventArgs e )
- {
- Response.Redirect( Request.Url.ToString( ) );
- }
- private void Button2_Click( object sender, System.EventArgs e )
- {
- Response.Write( "
- <script language=javascript>window.location.href=document.URL;
- </script>" );
- }
Response.AddHeader方法
- private void Button2_Click( object sender, System.EventArgs e )
- {
- Response.Write( "
- <script language=javascript>window.location.href=document.URL;
- </script>" );
- }
- private void Button3_Click( object sender, System.EventArgs e )
- {
- Response.AddHeader( "Refresh","0" );
- }
Javascript方法
- private void Button3_Click( object sender, System.EventArgs e )
- {
- Response.AddHeader( "Refresh","0" );
- }
- private void Button6_Click( object sender, System.EventArgs e )
- {
- //好像有些不对?
- //Response.Write( "
- <script language=javascript>window.location.reload( );
- </script>" );
- }