Response.Write Specific Introduction

Source: Internet
Author: User

Question one:

After Response.Write the connection Response.Redirect, Response.Write cannot display, jumps directly to Response.Redirect's page.

Solution:

Response.Write ("<script languge= ' JavaScript ' >alert (' successful changes '); window.location.href= ' index.aspx ' </script> ');


assumes that the script content contains variables, then the workaround is:

string a= the current record variable;
500) {this.resized=true;this.style.width=500;} " Align=top>response.write ("<script language= ' JavaScript ' >alert ('" +a+ "successfully changed"); window.location.href= "/index.aspx ' <";/script> ");

question two:
If you want to pass a reference in a connection, you can use the following method:
  string param =" parameters passed ";

response.write (" <script languge= ' JavaScript ' >alert (' successful changes '); Window.location.href= ' index.aspx? par = "+ param +" ' </script> ");

question three:
assumes that there was an error in page redirection with Response.Redirect () or Response.Write () in the UpdatePanel button in Ajax.
Because Ajax is not refreshed, the page needs to be refreshed when using response for a redirect. Setting "ControlID" for "Asp:postbacktrigger" under UpdatePanel is OK for the specified control name, for example:
<triggers>
<asp:postbacktrigger Controlid= "GridView"/>
</triggers>

The ability to use the client event method to solve the redirection problem in UpdatePanel

---------------------------------------------------------------------------

Jump to a specified page Response.Redirect ("Yxiaoloan.aspx? loan= "+ftype+" ");

-------------------------------------------------------------------------


Response.Write ("<script languge= ' JavaScript ' >window.parent.popupcontent.hide ();</script>");

Response.Write (" <script languge= ' JavaScript ' >window.parent.grdcartoother.performcallback ("+ Icrdid +"); </script> ");


Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert ('" + Ex.) Message + "');", true);

Response.Write Specific Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.