易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

ASP.NET下FCKeditor配置方法全解

本文所采用的FCKeditor版本是FCKeditor 2.6.4和FCKeditor.NET 2.6.3,都是当前FCKeditor的最新版本http://www.fckeditor.net上可以找到。
搞ASP.NET开发有一年时间了,做网站时常常用到在线HTML编辑器,一直用得是FCKeditor。FCKeditor在ASP.NET上的集成和配置,可以说搞得已经很清楚了。在网络上得到过很多前辈同仁们的帮 ......

asp.net面试题(6)

81.什么是soap,有哪些应用。   
 
答:simple object access protocal,简单对象接受协议.以xml为基本编码结构,建立在已有通信协议上(如http,不过据说ms在搞最底层的架构在tcp/ip上的soap)的一种规范web service使用的协议..   
 
 
 
82.c#中 property 与 a ......

ASP.NET页面静态化之URL重写 (转)

有关于URL的重写,本文也只是拿来主意。相继有MS的组件“URLRewriter”和在Global.asax里的“Application_BeginRequest()”编码方式,以及IIS里的ISAPI设置。
娜列下来,实现方法也都很简单。
方法一:MS组件
这里也不用详解了,相关请看:
http://www.microsoft.com/china/msdn/library/webservic ......

ASP.NET页面的CheckBoxList组件

CheckBox选择组件是一个程序中都经常的组件。在程序设计中使用到该组件,一般都不会只使用到一个,往往是以多个此类组件的形式出现的。在ASP.NET页面中如果要使用到多个CheckBox组件,除了添加多个CheckBox组件在页面中之外,还有一种比较方便的方法,就是使用CheckBoxList 组件。CheckBoxList组件是由一组的CheckBox组件组 ......

ASP.NET设置ie打印两法

   ASP.Net中最为头痛的可能就是打印设置了。
为了这个问题,我都要熬白头了。网上也找了很多代码,但是总是会存在一些问题。根据我自己的实际试验发现不能用,为找不到对象之类的错误提示。
这里给出两种实际可用的方法:
一。通过注册表修改IE打印设置
<HTML>
 <HEAD>
  < ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号