asp.netÖÐÈçºÎ±éÀúHashTable
asp.net±éÀúHashTableÐèÒªÓõ½DictionaryEntry Object£¬asp.net±éÀúHashTable£¬¿ÉÒÔͨ¹ýÈçÏÂÁ½ÖÖ·½·¨À´ÊµÏÖ£¬
·½·¨Ò»£º
foreach (System.Collections.DictionaryEntry objDE in objHasTab)
{
Console.WriteLine(objDE.Key.ToString());
Console.WriteLine(objDE.Value.ToString());
}
·½·¨¶þ£º
System.Collections.IDictionaryEnumerator enumerator = objHashTablet.GetEnumerator();
while (enumerator.MoveNext())
{
Console.WriteLine(enumerator.Key); // Hashtable¹Ø½¡×Ö
Console.WriteLine(enumerator.Value); // HashtableÖµ
}
¹þÏ£±íµÄ¼òµ¥²Ù×÷
ÔÚ¹þÏ£±íÖÐÌí¼ÓÒ»¸ökeyvalue¼üÖµ¶Ô£ºHashtableObject.Add(key,value);
ÔÚ¹þÏ£±íÖÐÈ¥³ýij¸ökeyvalue¼üÖµ¶Ô£ºHashtableObject.Remove(key);
´Ó¹þÏ£±íÖÐÒƳýËùÓÐÔªËØ£º HashtableObject.Clear();
ÅжϹþÏ£±íÊÇ·ñ°üº¬Ìض¨¼ükey£º HashtableObject.Contains(key);
ÏÂÃæ¿ØÖÆ̨³ÌÐò½«°üº¬ÒÔÉÏËùÓвÙ×÷£º
using System;
using System.Collections; fileʹÓÃHashtableʱ£¬±ØÐëÒýÈëÕâ¸öÃüÃû¿Õ¼ä
class hashtable
{
public static void Main()
{
Hashtable ht=new Hashtable(); file´´½¨Ò»¸öHashtableʵÀý
ht.Add(E,e);Ìí¼Ókeyvalue¼üÖµ¶Ô
ht.Add(A,a);
ht.Add(C,c);
ht.Add(B,b);
string s=(string)ht[A];
if(ht.Contains(E)) fileÅжϹþÏ£±íÊÇ·ñ°üº¬Ìض¨¼ü,Æä·µ»ØֵΪtrue»òfalse
Console.WriteLine(the E keyexist);
ht.Remove(C);ÒƳýÒ»¸ökeyvalue¼üÖµ¶Ô
Console.WriteLine(ht[A]);´Ë´¦Êä³öa
ht.Clear();ÒƳýËùÓÐÔªËØ
Console.WriteLine(ht[A]); file´Ë´¦½«²»»áÓÐÈκÎÊä³ö
}
}
Ïà¹ØÎĵµ£º
1. INTRODUCTION
´óÁ¿µÄÍøÕ¾Ò³ÃæÊDzÉÓö¯Ì¬µÄ·½Ê½£¬¸ù¾ÝÓû§Ìá½»µÄ²»Í¬ÇëÇó´´½¨Éú³ÉÒ³Ãæ¡£ÕýÈçÎÒÃÇËùÖªµÄ£¬¶¯Ì¬Ò³ÃæÓÐÖúÓÚ¸ù
¾ÝÓû§ÒªÇóÀ´Ìṩ¶¨ÖƵĶ¯Ì¬ÄÚÈÝ¡£¶¯Ì¬Ò³ÃæÒ²ÀûÓÚ»ñÈ¡ÔÚÊý¾Ý¿âÖÐÿʱÿ¿Ì¸üеÄ×ÊÁÏ¡£È±µãÊÇΪÿ¸öÓû§ÇëÇóÉú³ÉͬһҳÃæÔö¼ÓÁËϵͳ¿ªÏú¡£
ASP.NET
ÌṩÁË»º´æ¼¼ÊõÓ ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString( ......
ÑéÖ¤ÂëÒ³Ãæºǫ́Code.aspx.cs´úÂ룺£¨ÒѾ½«ÑéÖ¤Âë´æÓÚsessionÖÐsession["code"]£¬¿ÉÔÚµ÷ÓÃÒ³ÃæÖ±½Ó¶ÁÈ¡session£©
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebCon ......
ÎÒÃÇÔÚÊ״β¿ÊðmvcµÄÏîĿʱͨ³£»áÓöµ½Ò»µãÎÊÌâ¡£M$ÒѾÔÚGlobal.asax.csÎļþÖаüº¬ÁËÕâÁ½¾ä×¢Ê͵ÄÌáʾ¡£
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
µ«ÊÇÎÒÃÇ·ÃÎÊÕâ¸öÍøÖ·¿´µ½ÉÏÃæµÄÎÄÕ¶Ôiis5.1(win ......
ÔÚ2003ϵͳÏÂ,°´ÕÕÔÚIIS6ÖÐÍøÕ¾ÓÒ¼üÊôÐÔ£Ö÷Ŀ¼£ÅäÖãÔÚͨÅä·ûÓ¦ÓóÌÐòÓ³É䣲åÈëÉèÖÃÌí¼ÓͳÅä·û,¿ÉÖ´ÐÐÎļþÑ¡ÔñC:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll¡¡×¢Òâ“È·ÈÏÎļþÊÇ·ñ´æÔÚ”Õâ¸öÑ¡ÏҪѡÉÏ
2 Õ¾µãÖÐÒýÈëUrlRewrting.dll
3 Web.configÅäÖÃÐÞ¸ÄÈçÏ£º
<RewriterConfig& ......