Damn ie cache-about asp.net opening new window Return Value

Source: Internet
Author: User

For example:

On an asp.net page, use window. showModalDialog () to open the new window B. aspx.

It can be written as var ret = window. showModalDialog ("B. aspx ", '_ self', 'scrolling: no; resizable: no; status: no; dialogWidth: 550px; dialogHeight: interval PX; center: 1 ');

 

But in B. in aspx, if you click a linkbutton. open a new window outside the aspx window and display: javascript :__ dopostback (…) in the address bar of the new window (...);

This is terrible because showModalDialog cannot be used to open the window B. ASPX, And the html code generated by linkbutton is:

<A href = 'javascript :__ dopostback (...) ... In this way, it is opened in a new window by default. in plaintext, the target is set to '_ self', which is still opened in the window, and I am depressed ..

The code for force-opening is:

Var hypers = document. getElementsByTagName ("");
For (I = 0; I {
Hypers [ipolic.tar get = "_ self ";
}

 

Such code should be fine, but it is not easy to use. No matter how many times I update the cache

Finally, find related articles on the Internet and add them to the head label.<Base target = "_ self"/>

This method is indeed easy to use, and it will not happen after it is added, but how can ie6 be difficult to update the cache?

Cannot solve the problem of re-opening the web page...

 

Last. Suddenly I was so depressed.

Related Article

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.