¹Ø±ÕÊý¾Ý¿âÁ¬½ÓµÄ¸ßЧ·½·¨ (asp.net 2.0 C#)
ÎÒÃÇ»¹¿ÉÒÔ²ÉÓÃÒ»ÖÖ¸ü¼Ó¼ò±ãµÄ·½
·¨À´ÊµÏÖÉÏÊö³ÌÐòµÄ¹¦ÄÜ¡£Õâ¾ÍÊǽ«SqlConnection¶ÔÏó°üº¬µ½usingÇø¿éÖУ¬ÕâÑù³ÌÐò»á×Ô¶¯µ÷ÓÃDispose()·½·¨ÊÍ·Å
SqlConnection¶ÔÏóËùÕ¼ÓõÄϵͳ×ÊÔ´£¬ÎÞÐèÔÙʹÓÃSqlConnection¶ÔÏóµÄClose()·½·¨¡£
·¶Àý³ÌÐò´úÂëÈçÏ£º
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string connectionString = "server=localhost;database=Northwind;
integrated security=SSPI";
SqlConnection mySqlConnection = new SqlConnection(connectionString);
using (mySqlConnection)
{
mySqlConnection.Open();
lblInfo.Text = "<b>mySqlConnection¶ÔÏóµÄConnectionStringÊôÐÔΪ£º<b>" +
mySqlConnection.ConnectionString + "<br>";
lblInfo.Text += "<b>mySqlConnection¶ÔÏóµÄConnectionTimeoutÊôÐÔΪ<b>" +
mySqlConnection.ConnectionTimeout + "<br>";
lblInfo.Text += "<b>mySqlConnection¶ÔÏóµÄDatabaseÊôÐÔΪ<b>" +
mySqlConnection.Database + "<br>";
lblInfo.Text += "<b>mySqlConnection¶ÔÏóµÄDataSourceÊôÐÔΪ<b>" +
mySqlConnection.DataSource + "<br>";
lblInfo.Text += "<b>mySqlConnection¶ÔÏóµÄPacketSizeÊôÐÔΪ<b>" +
mySqlConnection.PacketSize + "<br>";
lblInfo.Text += "<b>mySqlConnection¶ÔÏóµÄServerVersionÊôÐÔΪ<b>" +
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
Ò»£ºC# Á¬½ÓSQLÊý¾Ý¿â
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User ID=myUse ......
Óà Java ½âÃÜ C# ¼ÓÃܵÄÊý¾Ý(DES)
[ÔÎĵØÖ·£ºhttp://yidinghe.cnblogs.com/articles/449212.html]
½ñÌìÅöÉÏÒ»¼þÁîÎÒÍ·´óµÄÊÂÇé¡£ÎÒÃǵÄϵͳҪºÍÒ»¸öÍⲿϵͳ½øÐÐͨѶ£¬´«Ê䷽ʽÊDzÉÓà DES Ëã·¨¶ÔÏûÏ¢½øÐмÓÃÜ£¬ÔÙÓà BASE64 ±àÂë¡£²»¹ý¶Ô·½ÏµÍ³ÊÇÓà C# дµÄ¡£Æ½Ì¨²»Ò»Ñù£¬ÓÚÊÇÎҺͶÔÃæµÄÀÏÐÖÏȲâÊÔһϼÓÃܽâÃÜ¡£ ......
ASP.NetÖÐ×îΪͷʹµÄ¿ÉÄܾÍÊÇ´òÓ¡ÉèÖÃÁË¡£
ΪÁËÕâ¸öÎÊÌ⣬ÎÒ¶¼Òª°¾°×Í·ÁË¡£ÍøÉÏÒ²ÕÒÁ˺ܶà´úÂ룬µ«ÊÇ×ÜÊÇ»á´æÔÚһЩÎÊÌâ¡£¸ù¾ÝÎÒ×Ô¼ºµÄʵ¼ÊÊÔÑé·¢ÏÖ²»ÄÜÓã¬ÎªÕÒ²»µ½¶ÔÏóÖ®ÀàµÄ´íÎóÌáʾ¡£
ÕâÀï¸ø³öÁ½ÖÖʵ¼Ê¿ÉÓõķ½·¨£º
Ò»¡£Í¨¹ý×¢²á±íÐÞ¸ÄIE´òÓ¡ÉèÖÃ
<HTML>
<HEAD>
< ......
Ê®Ììѧ»áASP.net֮ʵսϵÁУ¨C#ºÍVb.netË«°æ±¾£©
µÚÒ»Ìì
ÎÒÈÏΪASP.NET±ÈASPÄѺܶ࣬ϣÍû´ó¼Ò×öºÃ×¼±¸¡£ÄÑÄÑÔÚʵÏÖͬһ¸öЧ¹ûÓкܶ෽·¨£¬´ó¼Ò»òÐí»áÒÉ»ó¡£Ê®Ììѧ»áϵÁн̳̻áÇåÎúµÄд³ö¸÷ÖÖ·½·¨£¬Èôó¼ÒÄÜÉÙÒ»µã¿²¿À¡£ÔÚASPÀïÃ棬´ó¼Ò¼¸ºõ¶¼ÊÇʹÓÃVB£¬Êý¾Ý¿âÂҲÎÞ·ÇÊÇSQLºÍACCESS¡£ÔÚASP.NETÀïÃ棬Êý¾Ý¿â»¹ÊÇÕ ......