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

ASP.NET Cookies¼òµ¥Ó¦Óà ¼ÇסÓû§ÃûºÍÃÜÂ루ת£©

ASP.NET Cookies¼òµ¥Ó¦Óà ¼ÇסÓû§ÃûºÍÃÜÂë
 
ASP.NET Cookies¼òµ¥Ó¦Óà ¼ÇסÓû§ÃûºÍÃÜÂë
2009-06-11 22:45
±¾ÎÄת×Ôhttp://www.cnblogs.com/wayne-ivan/archive/2008/12/18/1357628.html
²»ÒªÊÔͼ¸øPasswordÀàÐ͵ÄTextBox¸³Öµ!
ÔÚasp.netÖУ¬²»ÒªÊÔͼ¸øPasswordÀàÐ͵ÄTextBox¿Ø¼þ¸³Öµ! ÎÞÂÛÊÇÔÚÉè¼Æ»òÊÇÔËÐÐʱ£¬¶¼²»¿ÉÒԵġ£
²Â²âµÄÔ­ÒòÊÇ£¬passwordÀàÐ͵ÄTextBox¿Ø¼þ´Ó¸ù±¾ÉÏ£¬Ã»ÓÐTextÊôÐÔµÄSet·½·¨£¬Ö»ÓÐGet !!
ͬÑù£¬htmlÖеÄInput¿Ø¼þ£¬Èç¹ûÉèÖÃΪruanat="server"£¬passwordÀàÐ͵ÄInput¿Ø¼þÒ²ÊÇÒ»Ñù¡£ÎÞÂÛÊÇÔÚÉè¼Æ»òÊÇÔËÐÐʱ£¬¶¼²»ÈÝÐíÉèÖÃËüµÄÖµ¡£
½â¾ö°ì·¨:txtPassword.Attributes["value"] = "123";
Ç°ÑÔ
          Ò»°ãÖ»ÒªÓлáÔ±¡¢Óû§»úÖƵÄÍøÕ¾»òÂÛ̳ÔڵǼµÄʱºò¶¼»áÓÐÕâôһ¸ö¸´Ñ¡¿ò——[¼ÇסÎÒµÄÃû×Ö | Á½ÖÜÄÚ²»Ôٵǽ | Ôڴ˼ÆËã»úÉϱ£´æÎÒµÄÐÅÏ¢]£¬Ëµ·¨½Ï¶à£¬ÊµÏÖÆðÀ´²î²»¶à£¬±¾ÎÄ×öÁËÒ»¸ö¼òµ¥µÄÀý×Ó²¢¸½´øÁËÒ»¸öC# Cookies°ïÖúÀà CookiesHelper.csºÍʵÏÖ´úÂëƬ¶Î£¬Ï£ÍûÄܶԳõѧÕßÓаïÖú: )
ÍƼöÎÄÕÂ
          1.     ÁÖÐÅÁ¼ index.datÎļþÆÊÎö ½ÏÉîÈë·ÖÎöcookiesÔÚindex.datÖдæÈëÇé¿ö
          2.     MSDN —— ASP.NET Cookie ¸ÅÊö ºÜÈ«ÃæºÜÏêϸµÄ½éÉÜÁËCookies
ÕýÎÄ
          CookiesHelper.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace TLibrary.ObjectHelper
{
    public class CookiesHelper
    {
        #region »ñÈ¡Cookie
        /// <summary>
        /// »ñµÃCookieµÄÖµ
        /// </summary>
        /// <param name="cookieName"></param>
        /// <returns></returns>
        public static string GetCo


Ïà¹ØÎĵµ£º

ÔÚasp.netÖÐʹÓÃsession³£¼ûÎÊÌ⼯½õ

ÎÊ£ºÎªÊ²Ã´SessionÔÚÓÐЩ»úÆ÷ÉÏż¶û»á¶ªÊ§£¿
´ð£º¿ÉÄܺͻúÆ÷µÄ»·¾³ÓйØϵ£¬±ÈÈ磺·À»ðǽ»òÕßɱ¶¾Èí¼þµÈ£¬³¢ÊԹرշÀ»ðǽ¡£
ÎÊ£ºÎªÊ²Ã´µ±µ÷ÓÃSession.Abandonʱ²¢Ã»Óм¤·¢Session_End·½·¨£¿
´ð£ºÊ×ÏÈSession_End·½·¨Ö»Ö§³ÖInProc£¨½ø³ÌÄڵģ©ÀàÐ͵ÄSession¡£Æä´ÎÒª¼¤·¢Session_End·½·¨£¬±ØÐë´æÔÚSession£¨¼´ÏµÍ³ÖÐÒѾ­Ê¹Ó ......

asp.net ͼƬˮӡ

string mapho = request["imgpath"];//»ñȡij¸öÒ³Ãæ´«¹ýµÄͼƬÃû³Æ
  string str1 = Server.MapPath(mapho);//ÒªÌí¼ÓˮӡµÄͼƬ
  string str2 = Server.MapPath("WaterMark.jpg");//Ìí¼ÓµÄÄÚÈÝͼƬ
  System.Drawing.Image bmp = System.Drawing.Image.fromFile(str1);
  Graphics gs = Graphics. ......

ASP.NETÓëMySqlµÄÁ¬½Ó——Êý¾Ý¿â·ÃÎʲÙ×÷

1.¶Á³ö·½Ê½
DataReaderºÍDataSet¶¼¿ÉÒÔʵÏÖ¶ÔÊý¾Ý¿âÊý¾ÝµÄ²éѯ·µ»Ø£¬µ«Ç°ÕßÖ»ÄÜÌṩ¿ìËٵIJéѯ·½Ê½£¬ºóÕß»¹¿ÉÒÔʵÏÖ¶ÔÊý¾ÝµÄÌí¼Ó¡¢Ð޸ġ¢É¾³ý¹¦ÄÜ¡£
£¨1£©DataReader·½Ê½¶ÁÈ¡£º
string sConnString = "server=localhost;User Id=root;password=root;Persist Security Info=True;database=db_user";
MySqlConnection myC ......

ASP.NETÓëMySqlµÄÁ¬½Ó——ÍøÕ¾µÄ²¿Êð

1. Êý¾Ý¿âµÄ²¿Êð
£¨1£©Èí¼þµÄ°²×°
A. MySql——±ØÐë°²×°ÔÚCÅÌÏ£¬·ñÔò°²×°mysql-connector-net-6.2.2ºóÎÞÕýÈ·ÅäÖÃ
B. mysql-connector-net-6.2.2——½«MySql.Data.dll·ÅÔÚBinÎļþ¼ÐÏÂ
£¨2£©Êý¾Ý¿âµÄµ¼³öµ¼Èë
MySQL-FrontµÄ"Áí´æΪ"¹¦ÄÜ¿ÉÒÔ½«Êý¾Ý¿âµ¼³öΪ.sqlÎļþ£¬È»ºóÔÙͨ¹ýËüÖ±½Óµ¼Èë.sqlÎļþ¿ ......

asp.netµÄpostback»úÖÆ£º__doPostBack

__doPostBack
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
function __doPostBack(eventTarget, eventArgument)
{
           if (!t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ