¶¨ÒåºÍʹÓÃASP.NET Profile(¸½Àý)
1¡¢Ë«»÷Ò»¸öÊý¾ÝÔ´¿Ø¼þ£¬½«Òª´æ´¢profileµÄÊý¾Ý¿â×÷ΪÊý¾ÝÔ´¼ÓÈë¿Ø¼þ£¨Õâ¸ö²½ÖèûʲôÓã¬Ö»ÊÇΪÁË·½±ã´ó¼ÒÓÿؼþ½¨Á¢Á¬½Ó£¬ÕâÑù²»ÈÝÒ׳ö´í£©£¬½¨Á¢ºÃÖ®ºó½«designÒ³ÃæµÄÊý¾ÝÔ´¿Ø¼þɾ³ý£¬Äã»á·¢ÏÖÔÚweb.configÀﻹÊÇÓÐÒ»ÌõÁ¬½ÓÓï¾ä£¬²»ÒªÉ¾³ý£¬ÎÒÃÇÏÂÃ潫Óõ½Ëü£¬È磺 <connectionStrings>
<add name="aspnetdbConnectionString" connectionString="Data Source=JAMESSHENG;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
2¡¢¶¨ÒåProfile,ÔÚÔ´ÂëÖмÓÈë
<profile enabled="true" automaticSaveEnabled="true" defaultProvider="SqlProvider">
<providers>
<clear/>
<add name="sqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="aspnetdbConnectionString" applicationName="ProfileSample" description="Sample for asp.net Profile and Profile Service"/>
</providers>
<properties>
<add name="BackGroudColor" type="System.String" allowAnonymous="true"/>
</properties>
</profile>
<anonymousIdentification enabled="true"/>
//defaultproviderÖ¸¶¨Ä¬ÈÏÅäÖÃÎļþÌṩ³ÌÐòµÄÃû³Æ
automaticSaveEnabledÖ¸¶¨Óû§ÅäÖÃÎļþÊÇ·ñÔÚ ASP.NET Ò³Ö´ÐнáÊøʱ×Ô¶¯±£´æ¡£Èç¹ûΪtrue£¬ÔòÓû§ÅäÖÃÎļþÔÚ ASP.NET Ò³Ö´ÐнáÊøʱ×Ô¶¯±£´æ¡£
providers(¿ÉÑ¡ÔªËØ)¶¨ÒåÅäÖÃÎļþÌṩ³ÌÐòµÄ¼¯ºÏ,Ëüµ±Öаüº¬<add> :name = defaultProviderµÄÖµ;type = System.Web.Profile.SqlProfileProviderÊÇʹÓÃsql;connectionStringName = aspnetdbConnectionStringʹÓÃÉÏÃæÁ¬½ÓÖж¨ÒåµÄÁ¬½Ó×Ö·û´®;
properties(±ØÑ¡µÄÔªËØ)¶¨ÒåÓû§ÅäÖÃÎļþÊôÐÔºÍÊôÐÔ×éµÄ¼¯ºÏ,Ëüµ±Öаüº¬<add>:name=“BackGroudColor”¶¨ÒåProfileÖеÄÊôÐÔÃû³Æ;type="System.String"×Ö·û´®ÀàÐÍ;allowAnonymous="true"¶¨ÒåÊÇ·ñ±£´æÄäÃûÓû§ÅäÖÃ,Èç¹ûÔÚ´Ë´¦¶¨Òåtrue£¬ÔòÔÚºóÃæ±ØÐë¼ÓÈë<anonymousIdentification>ÅäÖÃ,Éè
Ïà¹ØÎĵµ£º
ÔÚѧϰ¹ý³ÌÖÐÐèÒªÓõ½CookieÎļþ£¬ÔÚÍøÉÏÕÒÁËЩÏà¹ØµÄ֪ʶ£¬Ñ§Ï°ÁËÒ»²¿·Ö£¬ÏּǼÈçÏ£º
£¨1£©
HttpCookie myHttpCookie = new HttpCookie("MyWebSite");
DateTime myDateTime = System.DateTime.Now;
TimeSpan myTimeSpan = new TimeSpan();
if (rbHour.Checked == true)
{
myTimeSpan = new Ti ......
ÔÚѧϰ¹ý³ÌÖз¢ÏÖÈç¹ûÒªÉÏ´«µÄÕÕƬºÜ´óµÄ»°£¬ËٶȻáºÜÂý£¬ËùÒÔ²ÉÓÃÁËÔÚÉÏ´«ÕÕƬʱͬʱÉÏ´«ËõÂÔͼµÄ·½Ê½£¬ÕâÑù¾Í¿ÉÒԼȲ»Ó°Ïì¶à¸öͼƬµÄä¯ÀÀ£¬ÓÖ²»Ó°Ïì²é¿´¾ßÌåµÄͼƬ¡£
ÐèÒªÓõ½µÄÃüÃû¿Õ¼ä£º
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;
#region ±£´æÉÏ´«Îļþ£¬·½·¨Ãû£ºUploadSave(string ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
¡¡¡¡2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1 ......
1. Êʵ±Ê¹ÓÃUpdatePanel
2. ÀûÓÃWebService·½·¨¶¯Ì¬Éú³ÉÓû§¿Ø¼þµÄÄÚÈÝ£¬±ÜÃâUpdatePanel»Ø´«Ôì³ÉµÄÐÔÄÜËðʧ£¨ViewState£©
3. ToolkitScriptManager´úÌæScriptManager
4. <asp:ScriptManager runat="server" ID="sm" ScriptMode="Release" EnablePartialRendering="false"
......
asp.net ajaxÖÐÎÄÂÒÂëµÄ½â¾ö£¿
2010-01-19 12:06
ÒÔǰûÔõô×ÐϸµÄÑо¿¹ýajax,Ö»ÊÇÓõ½Á˾ÍÖ±½ÓÄùýÀ´ÓÃ,·¢ÏÖÁËÎÊÌâÔÙÕÒ½â¾ö·½·¨.ÒÔÏÂÊÇÎÒÔÚÕÒ½â¾öÎÊÌâµÄ¹ý³ÌÖеÄÒ»µãССµÄ×ܽá.
Ò».̸AjaxµÄGetºÍPostµÄÇø±ð
Get·½Ê½:
ÓÃget·½Ê½¿É´«Ëͼòµ¥Êý¾Ý£¬µ«´óСһ°ãÏÞÖÆÔÚ1KBÏ£¬Êý¾Ý×·¼Óµ½urlÖз¢Ë ......