打开指定大小的模式窗体
2007-08-30 18:27
288 查看
public static void ShowModalDialogWindow(string webFormUrl, int width, int height, int top, int left)
{
#region
string features = "dialogWidth:" + width.ToString() + "px"
+ ";dialogHeight:" + height.ToString() + "px"
+ ";dialogLeft:" + left.ToString() + "px"
+ ";dialogTop:" + top.ToString() + "px"
+ ";center:yes;help=no;resizable:no;status:no;scroll=yes";
ShowModalDialogWindow(webFormUrl, features);
#endregion
}
public static void ShowModalDialogWindow(string webFormUrl, string features)
{
string js = ShowModalDialogJavascript(webFormUrl, features);
HttpContext.Current.Response.Write(js);
}
public static string ShowModalDialogJavascript(string webFormUrl, string features)
{
#region
string js = @"<script language=javascript>
showModalDialog('" + webFormUrl + "','','" + features + "');</script>";
return js;
#endregion
}
{
#region
string features = "dialogWidth:" + width.ToString() + "px"
+ ";dialogHeight:" + height.ToString() + "px"
+ ";dialogLeft:" + left.ToString() + "px"
+ ";dialogTop:" + top.ToString() + "px"
+ ";center:yes;help=no;resizable:no;status:no;scroll=yes";
ShowModalDialogWindow(webFormUrl, features);
#endregion
}
public static void ShowModalDialogWindow(string webFormUrl, string features)
{
string js = ShowModalDialogJavascript(webFormUrl, features);
HttpContext.Current.Response.Write(js);
}
public static string ShowModalDialogJavascript(string webFormUrl, string features)
{
#region
string js = @"<script language=javascript>
showModalDialog('" + webFormUrl + "','','" + features + "');</script>";
return js;
#endregion
}
相关文章推荐
- 打开指定大小模式对话框
- 打开指定大小的新窗体
- 打开指定大小的新窗体
- 在asp.net中可以打开指定窗体大小,是在javascript中指定的
- 打开指定大小的新窗体
- 窗体中有一个图片框,显示一副图片。要求:1)在窗体打开时,动态加载图片;2)设置图片显示模式为根据图片框大小缩放图片;3)图片自己找;4)当鼠标停留在图片框时,显示“**风光”提
- MFC窗体中打开第三方exe程序到指定区域
- 打开与图片大小相等的窗体
- 让网页中所有链接均在指定大小的新窗口中打开
- 模式窗体中提交的时候不打开新窗体
- 20110327-8.4.2-用ofstream打开文件,要保存文件中已经存在的数据,必须显式的指定app模式打开
- JS打开模式窗体
- 打开showModalDialog模式窗体并提交,且不打开新的IE窗口
- c++命令提示符窗体下打印指定大小的菱形代码
- 如何指定国内主流浏览器以何种模式打开网页
- 在MVVM模式中打开子窗体(Child Window) (转)
- (翻译)在MVVM模式中打开子窗体(Child Window)
- 文件类型关联 单例模式 用特定程序打开指定素材
- 请教如何在窗体加载时指定其大小和位置?
- open 打开指定大小的窗口 并且不可改变大小的方法