ÔÚasp.net AJAX¿Í»§¶ËʹÓø´ÔÓÊý¾ÝÀàÐÍ·½·¨
<script language="javascript" type="text/javascript">
¡¡¡¡function doubleSalary()
¡¡¡¡{
¡¡¡¡var employee = new Object();
¡¡¡¡employee.FirstName = "X";
¡¡¡¡employee.LastName = "PP";
¡¡¡¡employee.Salary = 1000;
¡¡¡¡ComplexType.ServerMethod(employee, onServerMethodSucceeded);
¡¡¡¡}
¡¡¡¡function onServerMethodSucceeded(result)
¡¡¡¡{
¡¡¡¡var message = String.format(
¡¡¡¡"First Name: {0}\nLast Name: {1}\nFull Name: {2}\nSalary: {3}",
¡¡¡¡result.FirstName,
¡¡¡¡result.LastName,
¡¡¡¡result.FullName,
¡¡¡¡result.Salary);
¡¡¡¡alert(message);
¡¡¡¡}
¡¡¡¡</script>
¡¡¡¡Õâ¶Î´úÂëÊ×Ïȶ¨ÒåÁËÒ»¸ödoubleSalary·½·¨£¬ÀïÃ涨ÒåÁËÒ»¸ö¿Í»§¶ËemployeeʵÌåÀ࣬Ȼºó½«Æä´«¸ø·þÎñÆ÷¶ËWebServiceµÄij¸ö·½·¨¡£ComplexType ÊÇWebService µÄÀàÃû£¬ServerMethodÊÇ·þÎñÆ÷¶Ë·½·¨£¬onServerMethodSucceededÊÇ¿Í»§¶Ë»Øµ÷·½·¨£¬×÷ÓÃÊÇ´¦Àí·þÎñÆ÷·½·¨½áÊøÖ®ºóµÄ¿Í»§¶Ëʼþ£¬È»ºóÔÚÕâ¸öʼþÖоÍÄÜ·¢ÏÖ¿Í»§¶Ë֮ǰ¶¨ÒåµÄÊý¾Ý·¢ÉúÁ˱仯
¡¡¡¡¿Í»§¶ËÔÚÖ´ÐÐdoubleSalaryÖ®ºó£¬·¢¸ø·þÎñÆ÷µÄRequestBodyÆäʵÊÇÏÂÃæµÄ×Ö·û´®£º
¡¡{"employee":{"FirstName":"X","LastName":"PP","Salary":1000}}
¡¡¡¡¶ø·þÎñÆ÷ÏìÓ¦»Ø¸ø¿Í»§¶ËµÄÊý¾ÝÆäʵÊÇÒ»¶ÎJSON×Ö·û´®£º
¡¡{"d":{"__type":"Employee","FirstName":"X","LastName":"PP","Salary":2000,"FullName":"X PP"}}
¡¡¡¡ÐèҪעÒâµÄÊÇÕâÀïËäÈ»ÊÇ¿Í»§¶Ëµ÷Ó÷þÎñÆ÷¶ËµÄWebService£¬µ«²¢²»ÊÇͨ¹ýSOAP¶øÊÇJSONÀ´´«ËÍÊý¾ÝµÄ¡£
Ïà¹ØÎĵµ£º
//¸ù¾ÝÖ÷¼üÀ´É¾³ý±íÖеÄÊý¾Ý¡£
//ɾ³ý
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
OleDbConnection sqlConnection = new OleDbConnection(GetConnection());
& ......
DataGridView ¿Ø¼þDataGridView ¿Ø¼þÌṩÓÃÀ´ÏÔʾÊý¾ÝµÄ¿É×Ô¶¨Òå±í¡£Ê¹Óà DataGridView À࣬¿ÉÒÔ×Ô¶¨Òåµ¥Ôª¸ñ¡¢ÐС¢Áкͱ߿ò¡£
×¢Òâ
DataGridView ¿Ø¼þÌṩ DataGrid ¿Ø¼þËù²»¾ß±¸µÄÐí¶à»ù±¾ºÍ¸ß¼¶¹¦ÄÜ¡£Óйظü¶àÐÅÏ¢£¬Çë²Î¼û Windows ´°Ìå DataGridView ¿Ø¼þºÍ
DataGrid ¿Ø¼þÖ®¼äµÄÇø±ð
³£ÓÃÊôÐÔ:
DefaultCellStyle¡¢ ......
½â¾ö°ì·¨£ºapp_code/ ´æ·ÅÒ»¸öÀà ÓÃÀ´½Ø»ñHTTP
1.´úÂëÈçÏÂ
using System;
using System.IO;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;
/// <summary>
/// Removes whitespace from the webpage.
/// </summary>
public class ViewstateModule : IHttpModule
{
......
½éÉÜ£º
ÔÚÍøÒ³Ó¦ÓóÌÐòµÄ¿ª·¢ÖУ¬Ò³ÃæÖ®¼äµÄ´«ÖµÓ¦¸ÃÊÇ×î³£¼ûµÄÎÊÌâÁË¡£ ÔÚÕâƪÎÄÕÂÀazamsharp ½«ÎªÎÒÃǽéÉÜһЩASP.NETÒ³Ãæ´«ÖµµÄ·½Ê½¡£±¾ÎÄËù¾ÙµÄÀý×ӷdz£¼òµ¥£¬½ö½ö°üº¬ÁËÒ»¸öÎı¾¿òºÍ¼¸¸ö°´Å¥£¬µ±°´Å¥µã»÷ʱÎı¾¿òÖеÄ×Ö·û´®½«»áÒÔ²»Í¬µÄ·½Ê½´«µÝµ½ÁíÍâµÄÒ³ÃæÈ¥¡£
1. Response.Redirect £¨» ......
¡¾Ïà¶Ô·¾¶¡¿
Request.ApplicationPath
/src
Path.GetDirectoryName(HttpContext.Current.Request.RawUrl )
\\src\\Xiaoshe
Context.Request.Path
/src/Xiaoshe/Xiaoshe_New.aspx
Context.Request.CurrentExecutionFilePath
/src/Xiaoshe/Xiaoshe_New.aspx
Context.Request.FilePath
/src/Xiaoshe/Xiaoshe ......