<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0061)http://blog.csdn.net/21aspnet/archive/2007/03/25/1540301.aspx -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>C#精髓【月儿原创】第四讲 GridView 72般绝技 - 清清月儿 .NET万花筒 Asp.net技术 Asp.net教程 Asp.net源码 Asp.net基础 Asp.net控件 Asp.net入门 - CSDNBlog</TITLE>
<META content="MSHTML 6.00.2900.3086" name=GENERATOR>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT src="" type=text/javascript></SCRIPT>
<LINK media=all
href="C#精髓【月儿原创】第四讲 GridView 72般绝技 - 清清月儿 _NET万花筒 Asp_net技术 Asp_net教程 Asp_net源码 Asp_net基础 Asp_net控件 Asp_net入门 - CSDNBlog.files/style.css"
type=text/css rel=stylesheet><LINK media=print
href="C#精髓【月儿原创】第四讲 GridView 72般绝技 - 清清月儿 _NET万花筒 Asp_net技术 Asp_net教程 Asp_net源码 Asp_net基础 Asp_net控件 Asp_net入门 - CSDNBlog.files/print.htm"
type=text/css rel=stylesheet><LINK title=RSS
href="http://blog.csdn.net/21aspnet/rss.aspx" type=application/rss+xml
rel=alternate>
<SCRIPT language=javascript>
if(!window.attachEvent && window.addEventListener)
{
Window.prototype.attachEvent = HTMLDocument.prototype.attachEvent=
HTMLElement.prototype.attachEvent=function(en, func, cancelBubble)
{
var cb = cancelBubble ? true : false;
this.addEventListener(en.toLowerCase().substr(2), func, cb);
};
}
function scrollPosition()
{
var L, T, w=window, d=document, dd=d.documentElement;
if(w.pageXOffset) L=w.pageXOffset;
else if(dd&&dd.scrollLeft) L=dd.scrollLeft;
else if(d.body) L=d.body.scrollLeft;
if(w.pageYOffset) T=w.pageYOffset;
else if(dd&&dd.scrollTop) T=dd.scrollTop;
else if(d.body) T=d.body.scrollTop;
return {"left": L, "top": T};
}
function CreateWaitElement()
{
var loading = document.getElementById('loading');
if (!loading)
{
var str = "<div id='loading' style='color: #000000; \
background-color: #FFFFAF; \
padding: 0 3px; font-size: 12px; \
font-weight: bold; height: 30px; width: 160px; \
position: absolute; border: #cccccc 1px solid;\
'>正在处理您的请求...</div>";
var s = document.createElement("SPAN");
s.innerHTML = str;
loading = s.firstChild;
document.body.insertBefore(loading, document.body.firstChild);
}
return loading;
}
window.attachEvent("onload", function()
{
var loading = CreateWaitElement();
loading.style.display = "none";
window.attachEvent("onscroll", function(e)
{
var xy = scrollPosition();
loading.style.top = (xy.top + 10) +"px";
loading.style.left = (xy.left + document.body.offsetWidth - 200) +"px";
});
});
function Anthem_PreCallBack() {CreateWaitElement().style.display = ""; }
function Anthem_PostCallBack() {document.getElementById("loading").style.display="none";}
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT language=javascript type=text/javascript>
<!--
function getObject(objectId)
{
if(document.getElementById)
{
return document.getElementById(objectId)
}
else if(document.all&&document.all(objectId))
{
return document.all(objectId)
}
else
{
return false
}
}
function hideObject(objectId)
{
var obj=getObject(objectId);
if(obj&&obj.style)
{
obj.style.display="none";
return true
}
return false
}
function showObject(objectId)
{
var obj=getObject(objectId);
if(obj&&obj.style)
{
obj.style.display="";
return true
}
return false
}
function hideComment(){
hideObject("commentForm");
hideObject("commentform");
return;
}
function showComment(){
return;
}
//-->
</SCRIPT>
<FORM language=javascript id=Form1 name=Form1
onsubmit="javascript:return WebForm_OnSubmit();" action=1540301.aspx
method=post><INPUT id=__EVENTTARGET type=hidden name=__EVENTTARGET> <INPUT
id=__EVENTARGUMENT type=hidden name=__EVENTARGUMENT> <INPUT
id=" __VIEWSTATE" type=hidden name=__VIEWSTATE>
<SCRIPT type=text/javascript>
<!--
var theForm = document.forms['Form1'];
if (!theForm) {
theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</SCRIPT>
<SCRIPT
src="C#精髓【月儿原创】第四讲 GridView 72般绝技 - 清清月儿 _NET万花筒 Asp_net技术 Asp_net教程 Asp_net源码 Asp_net基础 Asp_net控件 Asp_net入门 - CSDNBlog.files/WebResource.axd"
type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>
//<![CDATA[
var Anthem_DefaultURL = "1540301.aspx?Anthem_CallBack=true";
var Anthem_FormID = "Form1";
//]]>
</SCRIPT>
<SCRIPT type=text/javascript>
//<![CDATA[
// Anthem.js
// Updated Nov 13, 2006
// Used by encodeURIComponentNew to mimic function encodeURIComponent in
// IE 5.5+, Netscape 6+, and Mozilla
function utf8(wide) {
var c, s;
var enc = "";
var i = 0;
while(i<wide.length) {
c= wide.charCodeAt(i++);
// handle UTF-16 surrogates
if (c>=0xDC00 && c<0xE000) continue;
if (c>=0xD800 && c<0xDC00) {
if (i>=wide.length) continue;
s= wide.charCodeAt(i++);
if (s<0xDC00 || c>=0xDE00) continue;
c= ((c-0xD800)<<10)+(s-0xDC00)+0x10000;
}
// output value
if (c<0x80) enc += String.fromCharCode(c);
else if (c<0x800) enc += String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));
else if (c<0x10000) enc += String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));
else enc += String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F));
}
return enc;
}
var hexchars = "0123456789ABCDEF";
function toHex(n) {
return hexchars.charAt(n>>4)+hexchars.charAt(n & 0xF);
}
var okURIchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";
// Mimics function encodeURIComponent in IE 5.5+, Netscape 6+, and Mozilla
function encodeURIComponentNew(s) {
var s = utf8(s);
var c;
var enc = "";
for (var i= 0; i<s.length; i++) {
if (okURIchars.indexOf(s.charAt(i))==-1)
enc += "%"+toHex(s.charCodeAt(i));
else
enc += s.charAt(i);
}
return enc;
}
function Anthem_Encode(s){
if (typeof encodeURIComponent == "function") {
// Use JavaScript built-in function
// IE 5.5+ and Netscape 6+ and Mozilla
return encodeURIComponent(s);
} else {
// Need to mimic the JavaScript version
// Netscape 4 and IE 4 and IE 5.0
return encodeURIComponentNew(s);
}
}
// Primarily used by Anthem.Manager to add an onsubmit event handler
// when validators are added to a page during a callback.
function Anthem_AddEvent(control, eventType, functionPrefix) {
var ev;
eval("ev = control." + eventType + ";");
if (typeof(ev) == "function") {
ev = ev.toString();
ev = ev.substring(ev.indexOf("{") + 1, ev.lastIndexOf("}"));
}
else {
ev = "";
}
var func;
if (navigator.appName.toLowerCase().indexOf('explorer') > -1) {
func = new Function(functionPrefix + " " + ev);
}
else {
func = new Function("event", functionPrefix + " " + ev);
}
eval("control." + eventType + " = func;");
}
function Anthem_GetXMLHttpRequest() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else {
if (window.Anthem_XMLHttpRequestProgID) {
return new ActiveXObject(
评论0