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

asp.net µ÷Óô洢¹ý³Ì

1.»ñÈ¡Return·µ»ØÖµ
 ³ÌÐò´úÂë//´æ´¢¹ý³Ì
//Create PROCEDURE MYSQL
//     @a int,
//     @b int
//AS
//     return @a + @b
//GO
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString());
conn.Open();
SqlCommand MyCommand = new SqlCommand("MYSQL", conn);
MyCommand.CommandType = CommandType.StoredProcedure;
MyCommand.Parameters.Add(new SqlParameter("@a", SqlDbType.Int));
MyCommand.Parameters["@a"].Value = 10;
MyCommand.Parameters.Add(new SqlParameter("@b", SqlDbType.Int));
MyCommand.Parameters["@b"].Value = 20;
MyCommand.Parameters.Add(new SqlParameter("@return", SqlDbType.Int));
MyCommand.Parameters["@return"].Direction = ParameterDirection.ReturnValue;
MyCommand.ExecuteNonQuery();
Response.Write(MyCommand.Parameters["@return"].Value.ToString());
2.»ñÈ¡OutputÊä³ö²ÎÊýÖµ
 ³ÌÐò´úÂë//´æ´¢¹ý³Ì
//Create PROCEDURE MYSQL
//     @a int,
//     @b int,
//     @c int output
//AS
//     Set @c = @a + @b
//GO
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString());
conn.Open();
SqlCommand MyCommand = new SqlCommand("MYSQL", conn);
MyCommand.CommandType = CommandType.StoredProcedure;
MyCommand.Parameters.Add(new SqlParameter("@a", SqlDbType.Int));
MyCommand.Parameters["@a"].Value = 20;
MyCommand.Parameters.Add(new SqlParameter("@b", SqlDbType.Int));
MyCommand.Parameters["@b"].Value = 20;
MyCommand.Parameters.Add(new SqlParameter("@c", SqlDbType.Int));
MyCommand.Parameters["@c"].Direction = ParameterDirection.Output;
MyCommand.ExecuteNonQuery();
Response.Write(MyCommand.Parameters["@c"].Value.ToString());


Ïà¹ØÎĵµ£º

ASP.NET(c#)³£ÓÃÀຯÊý

 
³£Óú¯ÊýϵÁÐ:
public static string Get_ClientIP() µÃµ½¿Í»§¶ËIP
public static string Get_CMac(string IP) µÃµ½¿Í»§¶Ë CMac µØÖ·
public static string RequestF(string xPName,string xPType,int xLenDef) °²È«½ÓÊÕÊý¾ÝϵÁÐ
public static string Show_Cont(string xStr) ¹ýÂËÏÔʾ×Ö´®
public static str ......

ASP.NETµÄ״̬¹ÜÀí

 
ΪʲôҪ״̬¹ÜÀí
     B/SÓëC/SÁ½Öּܹ¹µÄÓÐ×ÅÍêÈ«²»Í¬µÄÔËÐлúÖÆ¡£C/S»ù±¾ÉÏËùÓеÄÈí¼þ¹¦Äܶ¼ÔÚ¿Í»§¶Ë(Client)ÖÐʵÏÖ£¨ËùÒÔC/SÒ²³ÆΪÅÖ¿Í»§¶Ë¼Ü¹¹£©£¬·þÎñÆ÷¶Ë(Server)Ö»Ìṩ»ù´¡·þÎñ£¬×îΪµäÐ͵ÄÊÇÊý¾Ý¿â·þÎñÌṩÊý¾Ý·þÎñ¡£¶øB/S¼Ü¹¹Ö÷ÒªµÄ¹¦ÄÜÔÚ·þÎñ¶Ë(Server)ʵÏÖ£¬¿Í»§¶ËµÄä¯ÀÀÆ÷( ......

asp.net Ç°ºǫ́³ÌÐòдµ½Ò»Æð

 <%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace ="System.Text" %>
<%@ Import Namespace="System.Data" %>
<%
    
    for (int i = 0; i <= 10; i++)
  ......

asp.net¹¤×÷Ô­Àí


ASP.NETµÄÒ³Ãæ³õʼ»¯ÓëʼþÏê½â
 
Ò»¡¢³õʼ»¯
¡¡¡¡·µ±Ò³Ãæ±»Ìá½»ÇëÇóµÚÒ»¸ö·½·¨ÓÀÔ¶Êǹ¹Ô캯Êý¡£Äú¿ÉÒÔÔÚ¹¹Ô캯ÊýÀïÃæ³õʼһЩ×Ô¶¨ÒåÊôÐÔ»ò¶ÔÏ󣬲»¹ýÕâʱºòÒòΪҳÃ滹ûÓб»ÍêÈ«³õʼ»¯ËùÒÔ¶àÉÙ»áÓÐЩÏÞÖÆ¡£ÌرðµØ£¬ÄúÐèҪʹÓÃHttpContext¶ÔÏó¡£µ±Ç°¿ÉÒÔʹÓõĶÔÏó°üÀ¨QueryString, FormÒÔ¼°Cookies¼¯ºÏ£ ......

asp.netµÄ³ö·ÎÊÌâ

    ¿´ÁËÕÐƸÐÅÏ¢£¬Ã»·¢ÏÖ¼¸¸öÊÇÕÐ.netµÄ£¬¶¼ÊÇJava »òÕßC¡¢C++ ¡£·¢ÏÖ²ÎÓëµÄÏîÄ¿¾­ÑéÔÚУ԰ÕÐƸÒѾ­Ã»ÓÐÓÅÊÆÁË£¬
   ËƺõÍâÃæ¸üϲ»¶Java£¬µ«ÊǸöÈ˸оõ.NET»áÓкÜÇ¿´óµÄÇ÷ÊÆ£¬ËùÒÔ»¹ÊÇѧϰѧϰ£¬µ«ÊÇÒ²²»·ÅÆúC++µÄ¿ñÈÈ£¬ºÍwindows±à³ÌµÄѧϰ¡£
   ºÃµÄµ¼Ê¦ÊÜÒæ·Ëdz£¡£¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ