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

jQuery Ajax ·½·¨µ÷Óà Asp.Net WebService µÄÏêϸÀý×Ó

¡¡¡¡jQuery Ajax µ÷ÓÃAspx.Net WebService µÄ¼¸¸ö³£ÓÿÉÒÔÖ±½Ó¸´ÖÆ´úÂëÔËÐС£

¡¡¡¡ws.aspx ´úÂë
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
¡¡¡¡<title></title>
¡¡¡¡<script src="jquery.js" type="text/javascript"></script>
¡¡¡¡<style type="text/css">
¡¡¡¡¡¡¡¡.hover
¡¡¡¡¡¡¡¡{
¡¡¡¡¡¡¡¡¡¡¡¡cursor: pointer; /*СÊÖ*/
¡¡¡¡¡¡¡¡¡¡¡¡background: #ffc; /*±³¾°*/
¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡¡¡.button
¡¡¡¡¡¡¡¡{
¡¡¡¡¡¡¡¡¡¡¡¡width: 150px;
¡¡¡¡¡¡¡¡¡¡¡¡float: left;
¡¡¡¡¡¡¡¡¡¡¡¡text-align: center;
¡¡¡¡¡¡¡¡¡¡¡¡margin: 10px;
¡¡¡¡¡¡¡¡¡¡¡¡padding: 10px;
¡¡¡¡¡¡¡¡¡¡¡¡border: 1px solid #888;
¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡¡¡#dictionary
¡¡¡¡¡¡¡¡{
¡¡¡¡¡¡¡¡¡¡¡¡text-align: center;
¡¡¡¡¡¡¡¡¡¡¡¡font-size: 18px;
¡¡¡¡¡¡¡¡¡¡¡¡clear: both;
¡¡¡¡¡¡¡¡¡¡¡¡border-top: 3px solid #888;
¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡¡¡#loading
¡¡¡¡¡¡¡¡{
¡¡¡¡¡¡¡¡¡¡¡¡border: 1px #000 solid;
¡¡¡¡¡¡¡¡¡¡¡¡background-color: #eee;
¡¡¡¡¡¡¡¡¡¡¡¡padding: 20px;
¡¡¡¡¡¡¡¡¡¡¡¡margin: 100px 0 0 200px;
¡¡¡¡¡¡¡¡¡¡¡¡position: absolute;
¡¡¡¡¡¡¡¡¡¡¡¡display: none;
¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡¡¡#switcher
¡¡¡¡¡¡¡¡{
¡¡¡¡¡¡¡¡}
¡¡¡¡</style>
¡¡¡¡<script type="text/javascript">
¡¡¡¡¡¡¡¡//ÎÞ²ÎÊýµ÷ÓÃ
¡¡¡¡¡¡¡¡$(document).ready(function() {
¡¡¡¡¡¡¡¡¡¡¡¡$('#btn1').click(function() {
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡$.ajax({
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡type: "POST",¡¡ //·ÃÎÊWebServiceʹÓÃPost·½Ê½ÇëÇó
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡contentType: "application/json", //WebService »á·µ»ØJsonÀàÐÍ
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡url: "WebService1.asmx/HelloWorld", //µ÷ÓÃWebServiceµÄµØÖ·ºÍ·½·¨Ãû³Æ×éºÏ ---- WsURL/·½·¨Ãû
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡data: "{}",¡¡¡¡¡¡¡¡ //ÕâÀïÊÇÒª´«µÝµÄ²ÎÊý£¬¸ñʽΪ data: "{paraName:paraValue}",ÏÂÃæ½«»á¿´µ½¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dataType: 'json',
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡success: function(result) {¡¡¡¡ //»Øµ÷º¯Êý£¬result£¬·µ»ØÖµ
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡$('#dictionary').append(result.d);


Ïà¹ØÎĵµ£º

ASP.NET¿Ø¼þ¿ª·¢Ö®ÊôÐÔ

Ò»¡¢Ð§¹ûͼ
1.¼òµ¥ÊôÐÔ
2.ÏÂÀ­¿òÊôÐÔ
3.ÑÕÉ«ÊôÐÔ
4.°üº¬ÊôÐÔ
5.¼¯ºÏÊôÐÔ
±à¼­Æ÷
6.ÈÕÆÚÊôÐÍ
¶þ¡¢³ÌÐò´úÂë
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Draw ......

asp.netÌá½»html±ê¼ÇºóµÄ×îÓŰ²È«´¦Àí

ASP.Net 1.1ºóÒýÈëÁ˶ÔÌá½»±íµ¥×Ô¶¯¼ì²éÊÇ·ñ´æÔÚXSS(¿çÕ¾½Å±¾¹¥»÷)µÄÄÜÁ¦¡£µ±Óû§ÊÔͼÓÃÖ®ÀàµÄÊäÈëÓ°ÏìÒ³Ãæ·µ»Ø½á¹ûµÄʱºò£¬ASP.NetµÄÒýÇæ»áÒý·¢Ò»¸ö HttpRequestValidationExceptioin¡£Ä¬ÈÏÇé¿öÏ»᷵»ØÈçÏÂÎÄ×ÖµÄÒ³Ãæ£º
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
Server Error in '/YourApplicationPath' Application
A potentially dangerou ......

asp.net2.0µÄTreeView¶ÔcheckboxµÄ²Ù×÷

´ó¼Ò»áÔÚASP.NET 2.0ʹÓÃTreeView¿Ø¼þʱ·¢ÏÖ´øÓÐCheckBox¿Ø¼þµÄTreeNode¶ÔÏó£¨TreeView½Úµã£©£¬Ñ¡ÔñCheckBoxÎÞ·¨»Ø·¢Ò³Ãæ¡£ÔÚMSDNÖжÔÓÚTreeView.TreeNodeCheckChangedʼþÓÐÒ»¶Î±¸×¢£º“µ± TreeView ¿Ø¼þµÄ¸´Ñ¡¿òÔÚÁ½´ÎÏò·þÎñÆ÷·¢ËÍÖ®¼ä¸ü¸Ä״̬ʱ£¬»áÒý·¢ TreeNodeCheckChanged ʼþ¡£ÕâʹÄú¿ÉÒÔÌṩһ¸öÕâÑùµÄʼþ´ ......

Êý×Ö·ÖÒ³µ¼º½Ìõ (asp.net C#)


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.Text;
using ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ