asp /asp.net c#Á´½ÓOrcale Êý¾Ý¿âµÄ·½°¸
1£¬ÔÚweb·þÎñÆ÷Éϰ²×°OracleÊý¾Ý¿â¿Í»§¶Ë£¬ÕâÊÇÁ¬½ÓOracleÊý¾Ý¿âµÄ»ù´¡£¨µ«£¬²»Ò»¶¨ÊDZØÐëµÄ£©¡£
2£¬ÔÚ¿Í»§¶ËµÄNet Manager ÖнøÐÐÅäÖ÷þÎñµÄÃû³Æ£¬ÅäÖÃÈçͼ£¨ÕâÒ»µã·Ç³£µÄÖØÒªÒÔºóµÄÁ´½ÓÈ«¶¼ÔÚÕâ¸ö·þÎñÃû³ÆµÄ»ù´¡ÉϽøÐеģ©
3£¬ASPÁ´½Ó·þÎñµÄÁ´½Ó×Ö·û´®ºÍ·½·¨ÈçÏ£º
<%
connstr= "Provider=MSDAORA.1;Password=***;User ID=***;Data Source=ipcheck;"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
%>
4£¬ASP.net(C#) Á´½ÓÊý¾Ý¿â ¿ÉÒÔʹÓÃÕâÆªÎÄÕ½éÉܵķ½Ê½
Ìí¼Ó
<appSettings>
<add key="SysDSN" value="Data Source=ServerName;User ID=userid;Password=password;Unicode=True"/>
</appSettings>
ÔÙÕߣ¬¾Í¿ÉÒÔÌí¼ÓÒ»¸ömyclassÎļþ¼Ð£¬Ö®ºóÔÚÆäÖн¨¸öÀàÎļþ£¬Ä¬ÈÏÃüÃû¿Õ¼äÊÇmyClass
ÀàÎļþÃûΪconn.cs
ÓÉÓÚVS.NET2005²»Ä¬ÈÏÖ§³ÖoracleÊý¾Ý¿â£¬ËùÒÔÒªÌí¼ÓÆäÒýÓãºÔÚ½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷ÀïÌí¼ÓÒýÓãºSystem.Data.OracleClient£¨×ÐϸÕÒÕÒàÞ~ÔÚ.NETÑ¡ÏÖУ©
ÄÚÈÝ£¨²»¶Ï¸üУ©£º
1using System;
2using System.Data;
3using System.Configuration;
4using System.Web;
5using System.Web.Security;
6using System.Web.UI;
7using System.Web.UI.WebControls;
8using System.Web.UI.WebControls.WebParts;
9using System.Web.UI.HtmlControls;
10using System.Data.OracleClient;
11
12namespace User.Data
13{
14 public class conn
15 {
16
17 ¹¹Ô캯Êý#region ¹¹Ô캯Êý
18 /**//// <summary>
19 /// ¹¹Ô캯Êý(ĬÈÏ)
20 /// </summary>
21 public conn() { }
 
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔǰµÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕß¶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
aspÖеÄrs.openÓÚconn.executeµÄÇø±ð
rs.open sql,conn£ºÈç¹ûsqlÊÇdelete,update,insertÔò»á·µ»ØÒ»¸ö¹Ø±ÕµÄ¼Ç¼¼¯£¬ÔÚʹÓùý³ÌÖв»ÒªÀ´¸örs.closeÔÚÎļþ×îºóÔÙдrs.close
Öмä¿ÉÒÔÀ´¶à¸ö¼Ç¼¼¯rs1.open sql1,conn£¬×îºóÒ»¿é¹Ø±Õ¼Ç¼¼¯:rs.close rs1.close
con ......
×öÏîĿҲÓÐÒ»¶Îʱ¼äÁË£¬ÔÚ³ÌÐòÖÐÒ²Óöµ½ºÜ¶à°²È«·½ÃæµÄÎÊÌâ¡£Ò²¸Ã×ܽáÒ»ÏÂÁË¡£Õâ¸öÏîÄ¿ÊÇÒ»¸ö CMS ϵͳ¡£ÏµÍ³ÊÇÓà ASP.NET ×öµÄ¡£¿ª·¢µÄʱºò·¢ÏÖ΢Èí×öÁ˺ܶలȫ´ëÊ©£¬Ö»ÊÇÓÐЩÐÂÊÖ³ÌÐòÔ±²»ÖªµÀÔõô¿ªÆô¡£ÏÂÃæÎÒͨ¹ý¼¸¸ö·½Ãæ¼òµ¥½éÉÜ£º
¡¡¡¡1£ºSQL ×¢Èë
¡¡¡¡2£ºXSS
¡¡¡¡3£ºCSRF
¡¡¡¡4£ºÎļþÉÏ´«
SQL ×¢Èë
¡¡¡¡ÒýÆðÔÒ ......
˵Ã÷£º×¼±¸³öÒ»¸öϵÁУ¬Ëùν¾«Ëè½²C#ÓïÑÔÒªµã¡£Õâ¸öϵÁÐûÓÐÏȺó˳Ðò£¬²»¹ý¾¡Á¿×öµ½¾«¡£¿ÉÄܻ᲻¶ÏÔöɾÕûÀí£¬±¾ÏµÁÐ×îÔʼ³ö´¦ÊÇcsdn²©¿Í,лл¹Ø×¢¡£
C#¾«Ëè
µÚËĽ² GridView 72°ã¾ø¼¼
×÷ÕߣºÇåÇåÔ¶ù
Ö÷Ò³£ºhttp://blog.csdn.net/21aspnet/ ʱ¼ä£º2007. ......
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MySql ......