asp.netÖÐÔõÑùµ÷Óô洢¹ý³ÌºÍ´æ´¢¹ý³ÌµÄд·¨
----´´½¨Ò»¸öÖ»ÓÐÊäÈë²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_user
@name varchar(20),
@Password varchar(100)
as
select * from loginuser
where name like @name
---´´½¨Ò»¸öÓÐÊäÈëºÍÊä³ö²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_usertext
@name varchar(20),
@blog varchar(100) output
as
select @blog = blog from loginuser where name = @name
---´´½¨Ò»¸öÓÐÊäÈëºÍ·µ»Ø²ÎÊýµÄ´æ´¢¹ý³Ì
create PROCEDURE returnval
@name varchar(100),
@blog varchar(100) output
AS
begin
select @blog = blog from loginuser where name = @name
if(@blog is null)
set @blog = ''Ä㻹ûÓÐÉêÇ벩¿Í''
return execute(@blog ) --Êý¾ÝÊýÐ͵Äת»»
end
ÔÚasp.netÖеĵ÷ÓÃ
protected void Page_Load(object sender, EventArgs e)
{
DataBind();
}
private void DataBind()
{
//Ö»´øÊäÈë²ÎÊýµÄ´æ´¢¹ý³ÌµÄд·¨¡£
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
SqlCommand cmd = new SqlCommand("proc_user", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@name", "l%");
cmd.Parameters.AddWithValue("@Password", "lcs9702");
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
DropDownList1.DataSource = dr;
DropDownList1.Data
Ïà¹ØÎĵµ£º
ÌõÐÎÂëÊÇÆù½ñΪֹ×á¢ÊµÓõÄÒ»ÖÖ×Ô¶¯Ê¶±ð¼¼Êõ¡£ÌõÐÎÂë¼¼Êõ¾ßÓÐÒÔϼ¸¸ö·½ÃæµÄÓŵã
¡¡¡¡A£®ÊäÈëËٶȿ죺Óë¼üÅÌÊäÈëÏà±È£¬ÌõÐÎÂëÊäÈëµÄËÙ¶ÈÊǼüÅÌÊäÈëµÄ5±¶£¬²¢ÇÒÄÜʵÏÖ“¼´Ê±Êý¾ÝÊäÈ딡£
¡¡¡¡B£®¿É¿¿ÐԸߣº¼üÅÌÊäÈëÊý¾Ý³ö´íÂÊΪÈý°Ù·ÖÖ®Ò»£¬ÀûÓùâѧ×Ö·ûʶ±ð¼¼Êõ³ö´íÂÊΪÍò·ÖÖ®Ò»£¬¶ø²ÉÓÃÌõÐÎÂë¼¼ÊõÎóÂëÂʵ ......
61.²úÉúÒ»¸öintÊý×飬³¤¶ÈΪ100£¬²¢ÏòÆäÖÐËæ»ú²åÈë1-100£¬²¢ÇÒ²»ÄÜÖظ´¡£
int[] intarr=new int[100];
arraylist mylist=new arraylist();
random rnd=new random();
while(mylist.count<100)&nb ......
121.ÃèÊöÒ»ÏÂc#ÖÐË÷ÒýÆ÷µÄʵÏÖ¹ý³Ì£¬ÊÇ·ñÖ»Äܸù¾ÝÊý×Ö½øÐÐË÷Òý£¿
´ð£º²»ÊÇ¡£¿ÉÒÔÓÃÈÎÒâÀàÐÍ¡£
122.ÔÚc££ÖУ¬string str = null Óë string str = " " Ç뾡Á¿Ê¹ÓÃÎÄ×Ö»òͼÏó˵Ã÷ÆäÖеÄÇø±ð¡£
´ð£ºnullÊÇÃ»Ó ......
ÕªÒªÕªÒª:WebÍøÂçÓ¦Óÿª·¢ÖÐ,ƽ°²ÐÔÊÇÒª¿¼ÂǵĹؼüÐÂÎÊÌâ,±¾ÎÄͨ¹ý¿ª·¢ÏµÍ³Êµ¼ù,´Óϵͳ¹æ»®½×¶Î¡¢Éè¼Æ¿ª·¢½×¶Î¡¢·¢²¼ÔËÐн׶ÎÈý¸ö·½Ãæ¾ßÌå²ûÊöƽ°²²ßÂÔµÄʵÏÖ,×ܽá³öÈçºÎ³ä·ÖÀûÓÃASP.NETµÄƽ°²»úÖÆ¡¢Êý¾Ý¿âƽ°²¿ØÖÆ¡¢ÔöÇ¿¹ÜÀíÔ±ÍøÂçƽ°²·À·¶Òâʶ,¹¹½¨Ò»¸öÐÔÄÜƽ°²µÄWebÓ¦ÓóÌÐò¡£
ÕªÒª:WebÓ¦ÓóÌÐò;web.config;ÈÏÖ¤ºÍÊÚȨ ......
ASP.NetÖÐ×îΪͷʹµÄ¿ÉÄܾÍÊÇ´òÓ¡ÉèÖÃÁË¡£
ΪÁËÕâ¸öÎÊÌ⣬ÎÒ¶¼Òª°¾°×Í·ÁË¡£ÍøÉÏÒ²ÕÒÁ˺ܶà´úÂ룬µ«ÊÇ×ÜÊÇ»á´æÔÚһЩÎÊÌâ¡£¸ù¾ÝÎÒ×Ô¼ºµÄʵ¼ÊÊÔÑé·¢ÏÖ²»ÄÜÓã¬ÎªÕÒ²»µ½¶ÔÏóÖ®ÀàµÄ´íÎóÌáʾ¡£
ÕâÀï¸ø³öÁ½ÖÖʵ¼Ê¿ÉÓõķ½·¨£º
Ò»¡£Í¨¹ý×¢²á±íÐÞ¸ÄIE´òÓ¡ÉèÖÃ
<HTML>
<HEAD>
< ......