ÔÚasp.net webserviceÖÐÈçºÎʹÓÃsession
ÔÚʹÓÃasp.net±àдwebserviceʱ£¬Ä¬ÈÏÇé¿öÏÂÊDz»Ö§³ÖsessionµÄ£¬µ«ÎÒÃÇ¿ÉÒÔ°ÑWebMethodµÄEnableSessionÑ¡ÏîÉèΪtrueÀ´ÏÔʽµÄ´ò¿ªËü£¬Çë¿´ÒÔÏÂÀý×Ó£º
1 н¨ÍøÕ¾WebSite
2 н¨web·þÎñWebService.asmx£¬Ëü¾ßÓÐÒÔÏÂÁ½¸ö·½·¨£º
C#-Code:
[WebMethod(EnableSession = true)]
public string Login(string name)
{
Context.Session["name"] = name;
return name;
}
[WebMethod(EnableSession = true)]
public string GetName()
{
if (Context.Session["name"] != null)
return Context.Session["name"].ToString();
else
return "";
}
3 Ìí¼Óasp.netÒ³ÃæSessionInWebservice.aspx
ASP.NET-Code:
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
<asp:Button ID="btnLogin" runat="server"
Text="Login" OnClick="btnLogin_Click" />
</div>
<div>
<asp:Button ID="btnGetName" runat="server"
Text="GetName" OnClick="btnGetName_Click" />
<asp:Label ID="lblName" runat="server" Text="Label"></asp:Label>
</div>
</form>
SessionInWebservice.aspx.cs
C#-Code:
protected void btnLogin_Click(object sender, EventArgs e)
{
WebService ws = new WebService();
ws.Login(txtName.Text);
}
protected void btnGetName_Click(object sender, EventArgs e)
{
WebService ws = new WebService();
lblName.Text = ws.GetName();
}
ÎÊ
Ïà¹ØÎĵµ£º
£¨±¸×¢£ºÎÄÖкìÉ«×ÖÌåÊÇÎÒÔÚÔÎĵĻù´¡ÉÏÌí¼ÓµÄ½âÊÍ˵Ã÷£©
΢ÈíµÄʵÀý½Ì²ÄÖн²ÁËÈýÖÖÓïÑÔ£ºc#¡¢vb ¡¢Jscript£¬ÎªÁËÈôó¼Ò¹ýÒ»°Ñж«Î÷ñ«£¬ÎÒÃÇ»¹ÊÇѧc#°É¡£Õâ¸ö×îºÃÓÐÒ»µãc++»ù´¡¡£
²»¹ýûÓÐҲûÓйØϵ£¬´ó²»Á˶à·ÑµãÁ¦ÁË¡£
ÈκÎÒ»ÃÅÓ ......
Ajax¿ª·¢ÈËÔ±ÐèÒªµÄJavaScript֪ʶ
JavaScriptµ®ÉúÓÚ1995 Ä꣬×î×³ÉÔÚNetsCape Navigatorä¯ÀÀÆ÷ÖС£Microsoft ÔÚIE3Öм¯³É¡£1998Äê±»±ê×¼»¯ÎªECMAScript.
Microsoft Ajax Library¸ÄÉÆÁËJavaScriptµÄÃæÏò¶ÔÏóÄ£ÐÍ¡£
3.1ʹÓöÔÏó
JavaScriptÖеĶÔÏó²¢²»ÊÇÀàÐ͵ÄʵÀý£¬ÒòΪJavaScript²»Ö§³ ......
¹úÄÚCMS£º
1.SiteServer CMS
SiteServer CMS ÍøÕ¾ÄÚÈݹÜÀíϵͳ£¨Öø×÷ȨµÇ¼ÇºÅ2008SR15710£©ÊǶ¨Î»ÓÚÖи߶ËÊг¡µÄCMSÄÚÈݹÜÀíϵͳ£¬Äܹ»ÒÔ×îµÍµÄ³É
±¾¡¢×îÉÙµÄÈËÁ¦Í¶ÈëÔÚ×î¶ÌµÄʱ¼äÄÚ¼ÜÉèÒ»¸ö¹¦ÄÜÆëÈ«¡¢ÐÔÄÜÓÅÒì¡¢¹æÄ£ÅÓ´óµÄÍøվƽ̨¡£
¡¡¡¡ SiteServer CMS ÊÇ»ùÓÚ΢Èí.NET ƽ̨¿ª·¢µÄÍøÕ¾ÄÚÈݹÜÀíϵͳ£¬Ëü¼¯³ÉÁËÄÚÈÝ·¢² ......
ASP.NET´úÂëÓÅ»¯Ò»¡¢Ò³ÃæºÍ·þÎñÆ÷¿Ø¼þ´¦Àí
1¡¢ASP.NET´úÂëÓÅ»¯±ÜÃâµ½·þÎñÆ÷µÄ²»±ØÒªµÄÍù·µÐгÌ
ÔÚijЩÇé¿öϲ»±ØʹÓà ASP.NET ·þÎñÆ÷¿Ø¼þºÍÖ´Ðлط¢Ê¼þ´¦Àí¡£ÀýÈ磬ÔÚ ASP.NET ÍøÒ³ÖÐÑéÖ¤Óû§ÊäÈë¾³£¿ÉÔÚÊý¾ÝÌá½»µ½·þÎñÆ÷֮ǰÔÚ¿Í»§¶Ë½øÐС£Í¨³££¬Èç¹û²»ÐèÒª½«ÐÅÏ¢´«µÝµ½·þÎñÆ÷ÒÔ½øÐÐÑéÖ¤»ò½«ÆäдÈëÊý¾Ý´æ´¢Çø£¬Çë±ÜÃâÊ ......