asp.net Web.config ÏêϸÅäÖÃ˵Ã÷
asp.net¿ª·¢µÄÅóÓÑ£¬¾³£Óõõ½web.configÎļþµÄÅäÖã¬ËùÒÔÎÒÃÇÌØÕûÀíÁËÖÐÎÄ˵Ã÷¡£
<?xml version="1.0" standalone="yes"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!--ÅäÖÃÈ«¾Ö±äÁ¿-->
<appSettings>
<add key="examstr" value="server=.;database=myweb_exam_db;uid=exam_login;pwd=xxd_examadmin"/>
</appSettings>
<!--ÅäÖÃÈ«¾Ö±äÁ¿-->
<!--ÍøվϵͳÅäÖÃ-->
<system.web>
<!--ÉÏ´«ÎļþʱÌáʾ·ÃÎʱ»¾Ü¾ø,Éú³ÉͼƬÎļþµÈʧ°ÜÎļþ¼ÐûÓиÄдȨÏÞ-->
<identity impersonate="true"/>
<!--ÔÚ¿Í»§¶ËÏÔʾ´íÎóÐÅÏ¢-->
<customErrors mode="Off" />
<!--ÔÊÐíÄäÃû·ÃÎÊ-->
<authorization>
<allow users="*" />
</authorization>
<!--ÆôÓøú×ÙÒ³Ãæ-->
<trace enabled="true" requestLimit="1000" pageOutput="true" traceMode="SortByTime" localOnly="true" />
<!--·ÀÖ¹ÍøÒ³ÂÒÂë-->
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312"/>
<!--ÓÐÁ½¸öformʱ£¬Óô°ÌåÌύʱÅäÖÃ-->
<pages validateRequest="false" enableSessionState="true" enableViewState="true" enableEventValidation="false"/>
<!--ÉèÖÃÉÏ´«Îļþ´óС-->
<httpRuntime executionTimeout="300" maxRequestLength="102400" useFullyQualifiedRedirectUrl="false"/>
</system.web>
<!--ÍøվϵͳÅäÖÃ-->
</configuration>
Ïêϸ³ö´¦²Î¿¼£ºhttp://www.jb51.net/article/18628.htm
Ïà¹ØÎĵµ£º
»·¾³£ºASP.NET(C#)£¬Visual Studio 2010¡£
Ìáʾ£ºÎ´ÄܼÓÔØÀàÐÍ“EMS.App_Code.PersonalInfo”¡£Èç¹û¸ÃÀàÐÍλÓÚApp_CodeÎļþ¼ÐÖУ¬Çë¼ì²éËüÊÇ·ñÒѱàÒë¡£Èç¹û¸ÃÀàÐÍλÓÚÒѱàÒëµÄ³ÌÐò¼¯ÖУ¬Çë¼ì²é¸Ã³ÌÐò¼¯ÊÇ·ñ±»¸ÃÏîÄ¿ÒýÓá£
´¦Àí£º
×Ô¼º×öµÃÒ»¸öС³ÌÐò£¬È¡ÃûEMS£¬²¢ÔÚApp_CodeÎļþ¼ÐϽ¨Á¢ÁËÀàPersonalInfo¡¢Sal ......
1. Get(¼´Ê¹ÓÃQueryStringÏÔʽ´«µÝ)
·½Ê½£ºÔÚurlºóÃæ¸ú²ÎÊý¡£
Ìص㣺¼òµ¥¡¢·½±ã¡£
ȱµã£º×Ö·û´®³¤¶È×Ϊ255¸ö×Ö·û£»Êý¾Ýй©ÔÚurlÖС£
ÊÊÓÃÊý¾Ý£º¼òµ¥¡¢ÉÙÁ¿¡¢¹Ø¼üµÄÊý¾Ý¡£
ÊÊÓ÷¶Î ......
ÒýÆðÕâ¸öµÄÔÒò´ó¸ÅÊÇÏÖ°²×°ÁË.Net Frameworkºó×°µÄIISµ¼ÖÂ.NetûÓÐÔÚIISÀï×¢²á¡£
ÔÚÍøÉÏÕÒÁ˺ܾö¼ÊÇ˵´Ó.netÃüÁîÐй¤¾ßÀïÔËÐÐaspnet_regIIS /i¾Í¿ÉÒÔÁË(»òÕßÔÚÀàËÆÏÂÃæµÄĿ¼£ºC:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i)£¬µ«ÊÇ×Ô¼ºÊÔÁ˺ܶà´Î¶¼²»ÐУ¬ºóÀ´·¢ÏÖ»¹ÊÇÒªÏÈжÔØÔÙ°²×°£¬ÖØд´½¨Îª ......
¾³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏÃæµÄº¯Êý¿ÉÒÔʵÏÖ£¬ÀýÈçstrKeyWordsֵΪ“½Å±¾Ö®¼Ò”ʱ
string strField = "id|className|classAdd";
string strKeyWords = this.tbxKeyWords.Text.Trim();
string strSql = dbexe.searchText("select * from class", strField, strKeyWords);
¾³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏà ......
ÔÚASP.NETÖÐÎÒÃǾ³£ÐèÒªÊä³öһЩJS½Å±¾£¬±ÈÈ絯³öÒ»¸ö¾¯¸æ´°¿Ú£¬·µ»Øµ½ÀúÊ·Ò³ÃæµÈJS¹¦ÄÜ£¬ÎÒ¿´µ½ÍøÉϺöàÕâ·½ÃæµÄ´úÂ룬ÒÔÏ´úÂëÊÇÆäÖÐÖ®Ò»¡£
Õû¸ö³ÌÐòµÄ´úÂëÈçÏ£º
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
/// &l ......