For example, B. aspx B a = new B ();
Replace page with;
Open a. Net window, And the. NET window is located at the beginning
/** // <Summary>
/// Open a. Net window, And the. NET window is located at the beginning
/// </Summary>
/// <Param name = "page"> used page </param>
/// <Param name = "url"> URL to be opened </param>
/// <Param name = "pagename"> name of the page to be opened </param>
/// <Param name = "win_width"> window width </param>
/// <Param name = "win_hight"> window height </param>
/// <Param name = "Left"> left position of the window </param>
/// <Param name = "TOP"> position on the right of the window </param>
/// <Param name = "centerflag"> whether the right center is yes/no </param>
/// <Param name = "status"> whether to display the status bar yes/no </param>
/// <Param name = "parentflag"> true: If the pop-up window is not closed, the parent window cannot be operated. False: the parent window can be operated. </param>
Public static void opennewwinodw (page, string URL, string pagename, string win_width, string win_hight, string left, string top, string centerflag, string status, bool parentflag)
{
String scriptstr = "";
If (parentflag)
{
Scriptstr = "<script language = JavaScript> showmodaldialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft:" + Left + "PX; dialogtop:" + TOP + "PX; center:" + centerflag. tostring () + "; help: No; resizeable: Yes; Status:" + status + "') </SCRIPT> ";
}
Else
{
Scriptstr = "<script language = JavaScript> showmodelessdialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft:" + Left + "PX; dialogtop:" + TOP + "PX; center:" + centerflag. tostring () + "; help: No; resizeable: Yes; Status:" + status + "') </SCRIPT> ";
}
Page. response. Write (scriptstr );
}
/** // <Summary>
/// Open a window that is located at the top of the window. If it is not closed, the parent window cannot be operated.
/// </Summary>
/// <Param name = "page"> used page </param>
/// <Param name = "url"> URL to be opened </param>
/// <Param name = "pagename"> name of the page to be opened </param>
/// <Param name = "win_width"> window width </param>
/// <Param name = "win_hight"> window height </param>
/// <Param name = "Left"> left position of the window </param>
/// <Param name = "TOP"> position on the right of the window </param>
/// <Param name = "centerflag"> whether the right center is yes/no </param>
/// <Param name = "parentflag"> true: If the pop-up window is not closed, the parent window cannot be operated. False: the parent window can be operated. </param>
Public static void opennewwinodw (page, string URL, string pagename, string win_width, string win_hight, string left, string top, string centerflag, bool parentflag)
{
String scriptstr = "";
If (parentflag)
{
Scriptstr = "<script language = JavaScript> showmodaldialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft:" + Left + "PX; dialogtop:" + TOP + "PX; center:" + centerflag + "; help: no; resizeable: Yes; Status: no') </SCRIPT> ";
}
Else
{
Scriptstr = "<script language = JavaScript> showmodelessdialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft:" + Left + "PX; dialogtop:" + TOP + "PX; center:" + centerflag + "; help: no; resizeable: Yes; Status: no') </SCRIPT> ";
}
Page. response. Write (scriptstr );
}
/** // <Summary>
/// Open a window that is located at the top of the window. If it is not closed, the parent window cannot be operated.
/// </Summary>
/// <Param name = "page"> used page </param>
/// <Param name = "url"> URL to be opened </param>
/// <Param name = "pagename"> name of the page to be opened </param>
/// <Param name = "win_width"> window width </param>
/// <Param name = "win_hight"> window height </param>
/// <Param name = "Left"> left position of the window </param>
/// <Param name = "TOP"> position on the right of the window </param>
/// <Param name = "parentflag"> true: If the pop-up window is not closed, the parent window cannot be operated. False: the parent window can be operated. </param>
Public static void opennewwinodw (page, string URL, string pagename, string win_width, string win_hight, string left, string top, bool parentflag)
{
String scriptstr = "";
If (parentflag)
{
Scriptstr = "<script language = JavaScript> showmodaldialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft:" + Left + "PX; dialogtop:" + TOP + "PX; center: No; help: No; resizeable: yes; Status: no') </SCRIPT> ";
}
Else
{
Scriptstr = "<script language = JavaScript> showmodelessdialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft:" + Left + "PX; dialogtop:" + TOP + "PX; center: No; help: No; resizeable: yes; Status: no') </SCRIPT> ";
}
Page. response. Write (scriptstr );
}
/** // <Summary>
/// Open a window that is located at the top of the window. If it is not closed, the parent window cannot be operated.
/// </Summary>
/// <Param name = "page"> used page </param>
/// <Param name = "url"> URL to be opened </param>
/// <Param name = "pagename"> name of the page to be opened </param>
/// <Param name = "win_width"> window width </param>
/// <Param name = "win_hight"> window height </param>
/// <Param name = "parentflag"> true: If the pop-up window is not closed, the parent window cannot be operated. False: the parent window can be operated. </param>
Public static void opennewwinodw (page, string URL, string pagename, string win_width, string win_hight, bool parentflag)
{
String scriptstr = "";
If (parentflag)
{
Scriptstr = "<script language = JavaScript> showmodaldialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft: 0px; dialogtop: 0px; center: No; help: No; resizeable: Yes; Status: no ') </SCRIPT> ";
}
Else
{
Scriptstr = "<script language = JavaScript> showmodelessdialog ('" + URL + "', '" + pagename + "', 'dialogwidth:" + win_width + "PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft: 0px; dialogtop: 0px; center: No; help: No; resizeable: Yes; Status: no ') </SCRIPT> ";
}
Page. response. Write (scriptstr );
}
/** // <Summary>
/// Open a window that is located at the top of the window. If it is not closed, the parent window cannot be operated.
/// </Summary>
/// <Param name = "page"> used page </param>
/// <Param name = "url"> URL to be opened </param>
/// <Param name = "win_width"> window width </param>
/// <Param name = "win_hight"> window height </param>
/// <Param name = "parentflag"> true: If the pop-up window is not closed, the parent window cannot be operated. False: the parent window can be operated. </param>
Public static void opennewwinodw (page, string URL, string win_width, string win_hight, bool parentflag)
{
String scriptstr = "";
If (parentflag)
{
Scriptstr = "<script language = JavaScript> showmodaldialog ('" + URL + "','', 'dialogwidth: "+ win_width +" PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft: 0px; dialogtop: 0px; center: No; help: No; resizeable: Yes; Status: no ') </SCRIPT> ";
}
Else
{
Scriptstr = "<script language = JavaScript> showmodelessdialog ('" + URL + "','', 'dialogwidth: "+ win_width +" PX ;"
+ "Dialogheight:" + win_hight + "PX; dialogleft: 0px; dialogtop: 0px; center: No; help: No; resizeable: Yes; Status: no ') </SCRIPT> ";
}
Page. response. Write (scriptstr );
}
# Endregion