asp.net 存储过程执行实例
protected void Page_Load(object sender, EventArgs e)
{
/*
sql脚本-创建学生表
create table student(id int,name varchar(50))
insert into student select 1,'小张'
insert into student select 2,'小王'
存储过程 功能:查询学生名称
create proc proc_getName
@id int,
@name varchar(50) output
as
begin
if exists(select 1 from student where id=@id)
select @name=name from student where id=@id
else
set @name='--未找到学生--'
end
*/
}
//执行存储过程
public void RunProcedure(string storedProcName, IDataParameter[] parameters)
{
string connectionString = "server=.;database=my;uid=sa;pwd=bb";//数据库连接串
using (SqlConnection connection = new SqlConnection(connectionString))
{
DataSet dataSet = new DataSet();
connection.Open();
SqlDataAdapter sqlDA = new SqlDataAdapter();
相关文档:
1.//弹出对话框.点击转向指定页面
Response.Write(" <script>window.alert('该会员没有提交申请,请重新提交!')
</script>"
;
Response.Write(" <script>window.location
='http://www.51aspx.com/bizpulic/upmeb.aspx' </script>"
;
2.//弹出对话框
Response.W ......
学习ASP.NET-初探Application状态 - 上一篇《浅谈TeeChart组件在ASP中的应用》下一篇《用IS6进行ASP软件的打包和自动安装(补充)》字体: 小|中|大 简|繁精彩推荐 asp.net中的application数组 Asp.net中application对象问题?请求.net学者指点…… 安装Asp.net 2.0服务器出现Server Application Unavailable ASP. ......
需要引用的类名空间
using System.Security.Cryptography;
using System.IO;
using System.text;
/// <summary>
/// 加密
// ......
方法一:javascript法 function btnClear() { for(i=0;i /// 清空指定页面上所有的控件内容,包括TextBox,CheckBox,CheckBoxList,RadioButton,RadioButtonList。但是不清 /// 除如ListBox,DropDownList,因为这样的控件值对当前页面来说还可以用,一般这些控件里都是保存的字典数据。 /// Author:Kevin /// 日期:2004-12 ......