The Asp.net pop-up window contains the permanent learning house)

Source: Internet
Author: User

Dim strScript As String = "<Script Language = 'vbscript'>" & vbCrLf
StrScript & = "opener.parent.doc ument. location. href =" "&".../Individual/UserJobs. aspx? EntityTableID = "& Request (" EntityTableID ") &" & ListID = "& BLL. tableType. entity & "& OrgID =" & Request ("OrgID") & "& TableID =" & oRightGroupAccessTableView. templateTable. tableID & IIf (Request ("RecordID") Is Nothing, "", "& RecordID =" & Request ("RecordID") & "" & vbCrLf
StrScript & = "</Script>" & vbCrLf
Response. Write (strScript)
// Close. The parent window dialog box is displayed, and the Child window is closed directly.
This. Response. Write ("<script language = javascript> window. close (); </script> ");
// Close. The parent window and Child Window are not displayed. Close them directly.
This. Response. Write ("<script> ");
This. Response. Write ("{top. opener = null; top. close ();}");
This. Response. Write ("</script> ");
// In the pop-up window, refresh the current page width = 200 height = 200 menu. Menu Bar, tool bar, address bar, and status bar none
This. response. write ("<script language = javascript> window. open ('rows. aspx ', 'newwindow', 'width = 200, height = 200') </script> ");
// Refresh the current page in the pop-up window
This. Response. Write ("<script language = javascript> window. open ('rows. aspx ') </script> ");
This. Response. Write ("<script> window. open ('webform2. aspx ',' _ blank '); </script> ");
// In the pop-up window, jump to the webform2.aspx page (in an IE window)
This. response. write ("<script language = javascript> alert ('registered successfully'); window. window. location. href = 'webform2. aspx '; </script> ");
// Close the current Child Window and refresh the parent window
This. Response. Write ("<script> window. opener. location. href = window. opener. location. href; window. close (); </script> ");
This. Response. Write ("<script> zookeeper opener.location.replace(w.w.opener.doc ument. referrer); window. close (); </script> ");
// Refresh the parent window in the Child Window
This. Response. Write ("<script> window. opener. location. href = window. opener. location. href; </script> ");
This. Response. Write ("<script> window. opener. location. href = 'webform1. aspx '; </script> ");
// A prompt window is displayed. After confirmation, A subwindow (WebForm2.aspx) is displayed)
This. Response. Write ("<script language = 'javascript '> alert (' published successfully! '); Window. open ('webform2. aspx') </script> ");
// A prompt window is displayed. After confirmation, refresh the parent window.
This. Response. Write ("<script> alert ('published successfully! '); Window. opener. location. href = window. opener. location. href; </script> ");
// The Same page is displayed.
<INPUT type = "button" value = "Button">
//
Response. Write ("parent. mainFrameBottom. location. href = 'yourwebform. aspx? Temp = "+ str + "';");

<Script language = "javascript">
<! --
Window. open ('page.html ', 'newwindow', 'height = 100, width = 400, top = 0, left = 0, toolbar = no, menubar = no, scrollbars = no, resizable = no, location = n o, status = no') // write a line
-->
</SCRIPT>

Parameter description:

<Script language = "javascript"> the js SCRIPT starts;
Window. open command to pop up a new window;
'Page.html 'name of the pop-up window;
'Newwindow' indicates the name of the pop-up window (not the file name). It is optional and can be replaced by null;
Height = 100 window height;
Width = 400 window width;
Top = the pixel value between the 0 window and the top of the screen;
Left = 0 the pixel value between the window and the left of the screen;
Toolbar = no indicates whether to display the toolbar. yes indicates display;
Menubar and scrollbars indicate the menu bar and scroll bar.
Resizable = no: whether to change the window size. yes: yes;
Location = no indicates whether the address bar is displayed. yes indicates yes;
Status = no whether to display the information in the status bar (usually the file has been opened), yes is allowed;
</SCRIPT> end of js SCRIPT
'Newwin': hides the toolbar in the menu bar's address bar.
Width = 50: width
Height = 50: height
Scrollbars = yes/no: scroll bar
Top = 50: the window is above the screen
Left = 50: the window is located at the left of the screen.
Example: window. open ('detail. aspx? ID = "+ e. item. cells [1]. text + "', 'newwin', 'width = 750, height = 600, scrollbars = yes, top = 50, left = 50 ');");
This. response. write ("<Script> window. open ('webform2. aspx ', '', 'toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = no, resizable = yes, width = 750, height = 470, left = 80, top = 40'); </script> ");
Example:
This. Response. Write ("<script> alert ('published successfully! '); Window. opener. location. href = window. opener. location. href; </script> ");
This. Response. Write ("<script> ");
This. Response. Write ("{top. opener = null; top. close ();}");
This. Response. Write ("</script> ");
Example: linkcolumn1.DataNavigateUrlFormatString = "javascript: varwin = window. open ('edit _ usr. aspx? Actid = {0} ', 'newwin', 'width = 750, height = 600, scrollbars = yes, top = 50, left = 50'); window. close ()";

 

 

 

Mainframe. Attributes. Add ("src", TreeView1.SelectedValue. ToString ());

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.