易截截图软件、单文件、免安装、纯绿色、仅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连接各类数据库集锦

1.C#连接连接Access
程序代码:
------------------------------------------------------------------------------- using System.Data;
using System.Data.OleDb;
..
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:BegASPNETNorthwind.mdb";
Ol ......

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取网页数据《数据采集》


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using Sy ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号