易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET Ajax实现弹出提示框,页面变灰不可点击

最近在网上看到一篇文章,讲ASP.NET ajax中的异常处理,有一部分是自定义javascript处理异常。突然想到网易邮箱中,弹出对话框,后边的页面变灰且不可点击的效果。
在网上找了一下,实现方法就是用两个层,一个层用来显示提示信息,一个层用来遮住页面;还有一个办法就是用iframe.两者的不同之处大概就在于iframe可以遮住全部的页面元素,而div则不能遮住下拉列表。
我这个例子使用的div,绝大部分引用了:http://www.cnblogs.com/Terrylee/archive/2006/11/13/Customizing_Error_Handling.html
代码如下:
Default.aspx 前台页面及javascript
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<mce:style type="text/css"><!--

#UpdatePanel1{
width: 200px; height: 50px;
border: solid 1px gray;
}
#AlertDiv{
left: 40%; top: 40%;
position: absolute; width: 200px;
padding: 12px;
border: #000000 1px solid;
background-color: white;
text-align: left;
visibility: hidden;
z-index: 99;
}

#AlertButtons{
position: absolute; right: 5%; bottom: 5%;
}
--></mce:style><style type="text/css" mce_bogus="1">
#UpdatePanel1{
width: 200px; height: 50px;
border: solid 1px gray;
}
#AlertDiv{
left: 40%; top: 40%;
position: absolute; width: 200px;
padding: 12px;
border: #000000 1px solid;
background-color: white;
text-align: left;
visibility: hidden;
z-index: 99;
}

#AlertButtons{
position: absolute; right: 5%; bottom: 5%;
} </style>
</head>
<body id="bodytag" style="margin: 0px" mce_style="margin: 0px">
<form id="form1" runat="server">
<asp:ScriptMan


相关文档:

asp.net 运行原理

主要类:
  System.Web.HttpRuntime
  System.Web.HttpApplicationFactory
  System.Web.HttpApplication
  System.Web.Compilation.BuildManager
  System.Web.Compilation.ApplicationBuildProvider
  System.Web.Compilation.BuildProvidersCompiler
  System.Web.UI.PageHandlerFactory
请求处理 ......

asp.net 母版页使用详解

[转]asp.net 母版页使用详解
母版页(扩展名是.master)
它的使用跟普通的页面一样,可以可视化的设计,也可以编写后置代码。与普通页面不一样的是,它可以包含ContentPlaceHolder控件,ContentPlaceHolder控件就是可以显示内容页面的区域。
代码如下:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile=" ......

在ASP.NET中下载文件

//TransmitFile实现下载
    protected void Button1_Click(object sender, EventArgs
e)
    {
        /*
       
微软为Response对象提供了一个新的方法TransmitFile来解决使用Response.BinaryWrite
......

ASP.NET常用语句1

1.//弹出对话框.点击转向指定页面
Response.Write(&quot; <script>window.alert('该会员没有提交申请,请重新提交!')
</script>&quot;);
Response.Write(&quot; <script>window.location
='http://www.51aspx.com/bizpulic/upmeb.aspx' </script>&quot;);
2.//弹出对话框
Re ......

ASP.NET页面刷新方法总结

第一:
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二:
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.location.href=document.URL; < /script&g ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号