Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netʵÏÖÎļþÉÏ´«´ø½ø¶ÈÌõ£¨¶àÖÖ·ç¸ñ£©

ÎļþÉÏ´« ´ø½ø¶ÈÌõ ¶àÖÖ·ç¸ñ ·Ç³£Æ¯ÁÁ£¡
²¿·Ö´úÂ룺
<form id="form1" runat="server">
<asp:ScriptManager ID="scriptManager" runat="server" EnablePageMethods="true" />
<script type="text/javascript">
var intervalID = 0;
var progressBar;
var fileUpload;
var form;
// ½ø¶ÈÌõ
function pageLoad(){
addHandler(get(’upload’), ’click’, onUploadClick);
progressBar = find(’progress’);
}
// ×¢²á±íµ¥
function register(form, fileUpload){
this.form = form;
this.fileUpload = fileUpload;
}
//ÉÏ´«ÑéÖ¤
function onUploadClick() {
var vaild = fileUpload.value.length > 0;
if(vaild){
get(’upload’).disabled = ’disabled’;
updateMessage(’info’, ’³õʼ»¯ÉÏ´«...’);
//Ìá½»ÉÏ´«
form.submit();
// Òþ²Øframe
Sys.UI.DomElement.addCssClass(get(’uploadFrame’), ’hidden’);
// 0¿ªÊ¼ÏÔʾ½ø¶ÈÌõ
progressBar.set_percentage(0);
progressBar.show();
// ÉÏ´«¹ý³Ì
intervalID = window.setInterval(function(){
PageMethods.GetUploadStatus(function(result){
if(result){
// ¸üнø¶ÈÌõΪÐÂÖµ
progressBar.set_percentage(result.percentComplete);
//¸üÐÂÐÅÏ¢
updateMessage(’info’, result.message);
if(result == 100){
// ×Ô¶¯Ïûʧ
window.clearInterval(intervalID);
}
}
});
}, 500);
}
else{
onComplete(’error’, ’Äú±ØÐèÑ¡ÔñÒ»¸öÎļþ’);
}
}
function onComplete(type, msg){
// ×Ô¶¯Ïûʧ
window.clearInterval(intervalID);
// ÏÔʾÏûÏ¢
updateMessage(type, msg);
// Òþ²Ø½ø¶ÈÌõ
progressBar.hide();
progressBar.set_percentage(0);
// ÖØÐÂÆôÓð´Å¥
get(’upload’).disabled = ’’;
// ÏÔʾframe
Sys.UI.DomElement.removeCssClass(get(’uploadFrame’), ’hidden’);
}
function updateMessage(type, value){
var status = get(’status’);
status.innerHTML = value;
// ÒƳýÑùʽ
status.className = ’’;
Sys.UI.DomElement.addCssClass(status, type);
}
</script>


Ïà¹ØÎĵµ£º

ÔÚ vs2008Ϊasp.net ajaxÌí¼ÓjsÖÇÄܸÐÖª

ÔÚ
vs2008Ϊasp.net ajaxÌí¼ÓjsÖÇÄܸÐÖª



½ñÌìÕÒÁ˺þã¬ÖÕÓÚ¸ãÇå³þÁË£¬scriptManager¿Ø¼þÖ§³ÖjsÖÇÄܸÐÖª£¬¶ø´ÓÆä¼Ì³ÐµÄtoolkitScriptManager²»Ö§³Ö¡£ÖÁÉÙÔÚ
vs2008b2ÖÐÊÇÕâÑù¡£
ÒªÔÚjsÎļþÖÐÌí¼Óasp.net ajaxµÄjsÖÇÄܸÐÖª£¨ÓëscriptManager¿Ø¼þÎ޹أ©£¬ÔÚjsÎļþµÄ¿ªÍ·Ìí¼ÓÕâÑùÒ»Ðм´¿É£º
//
/<referen ......

Asp.NET³£Óú¯Êý

Ucase(string) ½«×Ö·û´®×ª»»Îª´óд¡£
Val(string) ½«´ú±íÊý×ÖµÄ×Ö·û´®×ª»»ÎªÊýÖµÐÍ̬£¬Èô×Ö·û´®Öк¬ÓзÇÊý×ÖµÄÄÚÈÝÔò»á½«ÆäÈ¥³ýºó£¬ºÏ²¢ÎªÒ»Êý×Ö¡£
Weekday(date) È¡µÄ²ÎÊýÖеÄÈÕÆÚÊÇÒ»¸öÐÇÆڵĵڼ¸Ì죬ÐÇÆÚÌìΪ1¡¢ÐÇÆÚһΪ2¡¢ÐÇÆÚ¶þΪ3 ÒÀ´ËÀàÍÆ¡£
WeekDayName(number) ÒÀ½ÓÊյIJÎÊýÈ¡µÃÐÇÆÚµÄÃû³Æ£¬¿É½ÓÊյIJÎÊýΪ1 µ½ ......

asp.net ¹Ø±ÕÍøÒ³´úÂë

2ÖÖ·½·¨
Ò»¡¢linkbuttonµÄµ¥»÷ʼþÀï¹Ø±ÕÒ³Ã棬ƴ½Ó´úÂë¾ÍÊÇÁË
²¹³ä£¬²»¿ÉÄÜ£¬ÎÒ×Ô¼ºÊÔ¹ý£¬ÔÙ²¹³äÒ»ÏÂ
1.¹Ø±ÕʱÌáʾ“ÊÇ·ñ¹Ø±Õ”
Response.Write("<script language:javascript>javascript:window.close();</script>");
2.Ö±½Ó¹Ø±Õ²»Ìáʾ
Response.Write("<script language:javascrip ......

ASP.NETÅäÖÃÎļþWeb.config Ïêϸ½âÊÍ

Ò»¡¢ÈÏʶWeb.configÎļþ
 
  ¡¡¡¡Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄ
  Web.co ......

Asp.netÊý¾Ý°ó¶¨

Êý¾Ý°ó¶¨ÒÔ¼°Container.DataItemµÄ¾ßÌå·ÖÎö
Áé»îµÄÔËÓÃÊý¾Ý°ó¶¨²Ù×÷
°ó¶¨µ½¼òµ¥ÊôÐÔ:<%#UserName%>
°ó¶¨µ½¼¯ºÏ:<asp:ListBox id="ListBox1" datasource='<%# myArray%>' runat="server">
°ó¶¨µ½±í´ïʽ:<%#(class1.property1.ToString() + "," + class1.property2.ToString())%>
°ó¶¨µ½·½·¨·µ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ