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

ÔÚASP.NET AJAXÖзÀÖ¹Óû§¶à´ÎÌá½»Ò³Ãæ

ÔÚWeb¿ª·¢³ÌÐòÖУ¬ÍùÍùÓÉÓÚÖÖÖÖÔ­Òò£¬¿Í»§»á¶à´Î²Ù×÷Ò³Ãæµ¼ÖÂÊý¾ÝÈßÓà»ò²»Ò»Ö£¬ ÔÚASP.NET AJAX³öÏÖ֮ǰ¿ÉÒÔͨ¹ý¶Ô__dopostback()µÄµ÷Óõȷ½·¨Ò²¿ÉÒÔ·ÀÖ¹Ò³Ãæ¶à´ÎÌá½»¡£
ÔÚASP.NET AJAXÖеÄÒ³Ãæ¿Í»§¶ËÖÐÓÐÒ»¸ö½ÐonInitializeRequestµÄʼþ£¬ËüÔÚÒ³Ãæ³õʼ»¯Ö®Ç°´¥·¢£¬¿ÉÒÔ¶ÔÒ³ÃæµÄÌύʼþ½øÐпØÖÆ£¬²¢ÇÒ¿ÉÒÔµ÷ÓøÃʼþ²ÎÊýµÄÖеÄÒ»¸öset_cancel·½·¨¿ÉÒÔÈ¡ÏûÒ³ÃæµÄÌá½»£¬´Ó¶øºÜ¼òµ¥µÄʵÏÖ×èÖ¹Ò³ÃæµÄ¶à´ÎÌá½»¡£
¾ßÌå´úÂëÈçÏ£º
var btnSubmit = "<%=btnSubmit.ClientID %>";
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(onInitializeRequest);
function onInitializeRequest(sender,args)
{
if(prm.get_isInAsyncPostBack()&&args.get_postBackElement().id == btnSubmit)
{
args.set_cancel(true);
//¸øÓû§ÌáʾÕýÔÚ´¦ÀíÖÐ
}
$get(btnSubmit).disabled = true;
}


Ïà¹ØÎĵµ£º

ASP.NetÉú³ÉÑéÖ¤Âë

using System;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
public partial class images_code : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string chkCode = string.Empty;
//ÑÕÉ«ÁÐ±í£¬ÓÃÓÚÑéÖ¤Âë¡¢ÔëÏß¡¢Ôëµã
Color[] col ......

Asp.net ÊÂÎñ´¦Àí

ÊÂÎñ´¦ÀíÊÇÔÚÊý¾Ý´¦Àíʱ¾­³£Óöµ½µÄÎÊÌ⣬¾­³£Óõ½µÄ·½·¨ÓÐÒÔÏÂ3ÖÖ×ܽáÕûÀíÈçÏ£º ·½·¨1£ºÖ±½ÓдÈëµ½sql ÖÐ ÔÚ´æ´¢¹ý³ÌÖÐʹÓà BEGIN TRANS, COMMIT TRANS, ROLLBACK TRANS ʵÏÖ  Óŵ㣺ÊÂÎñÂß¼­°üº¬ÔÚÒ»¸öµ¥¶ÀµÄµ÷ÓÃÖУ¬ÓÐÔËÐÐÒ»¸öÊÂÎñµÄ×î¼ÑÐÔÄÜ£¬Á¢ÓÚÓ¦ÓóÌÐò¡£ÏÞÖÆ£º ÊÂÎñÉÏÏÂÎĽö´æÔÚÓÚÊý¾Ý¿âµ÷ÓÃÖУ¬Êý¾Ý¿â´úÂëÓëÊ ......

ASP.NETÁ¬½ÓSQLºÍACCESSµÄ·½·¨

SQL:
using System.Data.SqlClient;
string sql = "server=.;uid=sa;pwd=;database=tablename;";
ACCESS:
using System.Data.OleDb;
string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";
HttpRuntime.AppDomainAppPath Ϊ¸ùĿ¼
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ