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

ASP.NET 2.0 AJAXÖÐWebserviceµ÷Ó÷½·¨

ASP.NET 2.0 AjaxÖÐÄܹ»ÔÚ¿Í»§¶ËjsÖкܷ½±ãµØµ÷Ó÷þÎñÆ÷Webservice£¬ÒÔÏÂΪһЩµ÷ÓõÄʾÀý¡£±ÊÕß°²×°µÄASP.NET 2.0 AJAX
°æ±¾ÎªAJAX November CTP¡£
Èý¸öʾÀý·Ö±ðΪ£º
1 ´ø²ÎÊýµÄWS·½·¨
2 ²»´ø²ÎÊýµÄWS·½·¨
3 ²ÎÊýÀàÐÍΪDataTableµÄWS·½·¨
Ò»¡¢WebMethod
×¢ÒâÒªµã£º
1 WebMethodÀàÐèÒªÌí¼ÓÃüÃû¿Õ¼ä Microsoft.Web.Script.Services£¬´Ë¿Õ¼äÐèÒªÒýÓÃMicrosoft.Web.Preview.dll
2 ÀàÉùÃ÷¼ÓÈë±êÇ© [ScriptService]
3 ÔÚAsp.net 2.0Àï¿ÉÒÔÖ±½ÓÓÃDataTable×÷Ϊ·µ»ØÀàÐÍÁË£¬µ«ÊÇÐèÒªÔÚWeb.configÎļþÌí¼ÓÐòÁл¯×ª»»Æ÷µÄÊôÐÔ¡£DataSet¡¢DataTable¡¢DataRow¾ùÓÐת»»Æ÷
      < system.web.extensions>
¡¡¡¡< scripting>
¡¡¡¡< webServices>
¡¡¡¡< jsonSerialization>
¡¡¡¡< converters>
¡¡¡¡< add name="DataSetConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview"/>
¡¡¡¡< add name="DataRowConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview"/>
¡¡¡¡< add name="DataTableConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview"/>
¡¡¡¡< /converters>
¡¡¡¡< /jsonSerialization>
¡¡¡¡< /webServices>
¡¡¡¡< /scripting>
¡¡¡¡< /system.web.extensions>
WEB·þÎñ1£ºWS1
      using System;
¡¡¡¡using System.Web;
¡¡¡¡using System.Collections;
¡¡¡¡using System.Web.Services;
¡¡¡¡using System.Web.Services.Protocols;
¡¡¡¡using Microsoft.Web.Script.Services;
¡¡¡¡using System.Data;
¡¡¡¡/**////
¡¡¡¡/// WS1 µÄժҪ˵Ã÷
¡¡¡¡///
¡¡¡¡[WebService(Namespace = "http://tempuri.org/")]
¡¡¡¡[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
¡¡¡¡[ScriptService]
¡¡¡¡public class WS1 : System.Web.Services.WebService {
¡¡¡¡public WS1 () {
¡¡¡¡//Èç¹ûʹÓÃÉè¼ÆµÄ×é¼þ£¬ÇëÈ¡Ïû×¢ÊÍÒÔÏÂÐÐ
¡¡¡¡//InitializeComponent();
¡¡¡¡}
¡¡¡¡[WebMethod]
¡¡¡¡public string ServerTime()
¡¡¡¡{
¡¡¡¡return String.Format("now£º {0}", DateTime.Now);
¡¡¡


Ïà¹ØÎĵµ£º

asp.net(C#) Êý¾Ý¿â±¸·Ý»¹Ô­ Ô´Âë

Backup.aspx
  protected void Button1_Click(object sender, EventArgs e)
    {
        string path = Server.MapPath("") + @"\Backup";
        if (!Directory.Exists(path))
       ......

asp.net»ñÈ¡´«ÖµgetºÍpostÇëÇó

//postÇëÇó
string name = Request["name"].toString();
string name =Request.Form.Get("name").toString();
//getÇëÇó
string name = Request.QueryString["name"].toString();
µ«ÎÒ·¢ÏÖ ÎÞÂÛÊÇ·ñÊÇpostÓëget´«Öµ¶¼¿ÉÓÃ
string name = Request["name"].toString();

±íµ¥Ìá½»ÖÐgetºÍpost·½Ê½µÄÇø±ð¹éÄ ......

asp.netСÊýµãËÄÉáÎåÈëµÄ·½·¨

1.Ö»ÒªÇó±£ÁôNλ²»ËÄÉá5Èë
¡¡¡¡float f = 0.55555f£»int i =£¨int£©£¨f * 100£©£»f = £¨float£©£¨i*1.0£©/100£»
¡¡¡¡2.±£ÁôN룬ËÄÉáÎåÈë .
¡¡¡¡decimal d= decimal.Round£¨decimal.Parse£¨"0.55555"£©£¬2£©£»
¡¡¡¡3.±£ÁôNλËÄÉáÎåÈë
¡¡¡¡Math.Round£¨0.55555£¬2£©
¡¡¡¡4£¬±£ÁôNλËÄÉáÎåÈë
¡¡¡¡double dbdata = 0.5 ......

ASP.NET»·¾³µÄÅäÖÃ

½ñÌìÓÃÁË2¸öСʱµÄʱ¼äÀ´ÅäASP.NETµÄ»·¾³£¬ÓÐЩÈË¿ÉÄÜ»áÎÊ£¬ÎªÊ²Ã´ÐèÒªÕâô¾Ã£¬´ð°¸ºÜ¼òµ¥£¬ÒòΪÎÒµÄϵͳÊÇXPÉî¶ÈµÄ~ ËùÒÔ°²×°IISºÜ·Ñ¾¢£¬½ÓÏÂÀ´ÎÒÃèÊöÏÂÎÒÔõô°²×°µÄ¡£
ǰÌ᣺
1£©ÒѾ­°²×°ÁËVS2008£¬Õâ¸ö³ÌÐòÀïÃæÒѾ­´øÁË.NETµÄFramwork
²½Ö裨һ¶¨Òª¿´ÍêÎÒдµÄÔÙȥŪ£¡£¡£¡£©£º
1£©ÏÖÔÚµÄÈÎÎñÊÇÈ¥ÍøÉÏÏÂÔØÒ»¸öIIS5.Xµ ......

asp.net GridViewµÄһЩӦÓÃ

Ó¦ÓÃ1£ºGridViewºÍCheckBox½áºÏ
Ч¹ûͼ£º
Ó¦ÓÃ2£ºExtending the GridView Control
Code download available at: CuttingEdge05.exe (132 KB)
Browse the Code Online
 Contents
The GridView Difference
A New GridView Control
Adding a Checkbox Column
The New Grid In Action
Styling Selected ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ