上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页
摘要: using (Conn = new SqlConnection(ConnectionString)) { Conn.Open();//打开数据库连接 string sqlstr = "select * from UserInfo2"; SqlCommand cmd = new SqlCommand(sqlstr, Conn); cmd.CommandType = CommandType.Text; SqlDataReader dr = cmd.ExecuteReader(Comman... 阅读全文
posted @ 2013-01-21 10:16 yellowshorts 阅读(103) 评论(0) 推荐(0) 编辑
摘要: using (Conn = new SqlConnection(ConnectionString)) { //DataAdapter更新数据 Conn.Open();//打开数据库连接 string sqlstr = "select * from UserInfo2 where UserName = @UserName"; SqlDataAdapter da = new SqlDataAdapter(); SqlCommand updatecmd = new SqlCommand(s... 阅读全文
posted @ 2013-01-21 10:14 yellowshorts 阅读(242) 评论(0) 推荐(0) 编辑
摘要: using (Conn = new SqlConnection(ConnectionString)) { //DataAdapter插入数据 Conn.Open();//打开数据库连接 string sqlstr = "select * from UserInfo2"; SqlDataAdapter da = new SqlDataAdapter(); SqlCommand insertcmd = new SqlCommand(sqlstr, Conn); S... 阅读全文
posted @ 2013-01-21 10:13 yellowshorts 阅读(454) 评论(0) 推荐(1) 编辑
摘要: using (Conn = new SqlConnection(ConnectionString)) { //DataAdapter删除数据 Conn.Open();//打开数据库连接 string sqlstr = "select * from UserInfo2 where UserName = @UserName"; SqlDataAdapter da = new SqlDataAdapter(); SqlCommand deletecmd = new SqlCommand(s... 阅读全文
posted @ 2013-01-21 10:11 yellowshorts 阅读(158) 评论(0) 推荐(0) 编辑
摘要: protected SqlConnection Conn; protected string ConnectionString = "server=.; database=ExpatiateAspNet; uid=sa; pwd="; protected void Page_Load(object sender, EventArgs e) { using (Conn = new SqlConnection(ConnectionString)) { Conn.Open();//打开数据库连接 SqlComma... 阅读全文
posted @ 2013-01-21 09:50 yellowshorts 阅读(191) 评论(0) 推荐(0) 编辑
摘要: protected SqlConnection Conn; protected string ConnectionString = "server=.; database=ExpatiateAspNet; uid=sa; pwd="; protected void Page_Load(object sender, EventArgs e) { using (Conn = new SqlConnection(ConnectionString)) { Conn.Open();//打开数据库连接 SqlComma... 阅读全文
posted @ 2013-01-21 09:45 yellowshorts 阅读(565) 评论(0) 推荐(0) 编辑
摘要: 没有为扩展名“.html”注册的生成提供程序。可以在 machine.config 或 web.config 中的 <compilation><buildProviders> 节注册一个。请确保所注册的提供程序具有包含值“Web”或“All”的 BuildProviderAppliesToAttribute 属性。说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。解决方法:增加一项web.config配置节点(红色部分为需新增节点):<compilation defaultLanguage 阅读全文
posted @ 2013-01-21 09:22 yellowshorts 阅读(162) 评论(0) 推荐(0) 编辑
摘要: ParentWin:<input id="btnOpenWin" type="button" value="打开子窗体" onclick="window.open('ChildWin.aspx','','width=200,height=30');"/>ChildWin:<input id="btnSave" type="button" value="保存" onclick="al 阅读全文
posted @ 2013-01-19 17:24 yellowshorts 阅读(121) 评论(0) 推荐(0) 编辑
摘要: <asp:Button ID="btnRedirect" runat="server" Text="使用Redirect" OnClick="btnRedirect_Click" /> <asp:Button ID="btnTransfer" runat="server" Text="使用Transfer" OnClick="btnTransfer_Click" /> <asp:Button ID=&quo 阅读全文
posted @ 2013-01-19 17:22 yellowshorts 阅读(225) 评论(0) 推荐(0) 编辑
摘要: private double sum = 0; //GridView控件的行数据绑定事件 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) //如果是数据行 { if (!string.IsNullOrEmpty(e.Row.Cells[2].Text)) //销售金额不为空 { ... 阅读全文
posted @ 2013-01-19 17:20 yellowshorts 阅读(110) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页