12 2012 档案
摘要:privatevoidbtnCreate_Click(objectsender,EventArgse) {XmlDocumentxmlDoc =newXmlDocument();//建立Xml的定义声明XmlDeclarationdec = xmlDoc.CreateXmlDeclaration("1.0","GB2312",null); xmlDoc.AppendChild(dec);//创建根节点XmlElementroot = xmlDoc.CreateElement("Books"); xmlDoc.AppendChild(r
阅读全文
摘要:前台代码: <asp:Label Text="姓名:" runat="server" ID="label1"></asp:Label> <asp:TextBox ID="txtUserName" runat="server" Text=""></asp:TextBox><br /> <asp:Label ID="label2" Text="密 码" runat="
阅读全文
摘要:1 用存储过程实现分页,除了上一页,下一页,第一页,和末页外还要有go按钮,以及go到那里的文本框。另外还要在Lable显示“当前x页,一共y页”。注意验证控件的使用和 链接存储过程的内容。前台代码: <div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" > <Columns> <asp:BoundField DataField="id" HeaderText="
阅读全文
摘要:前台代码:<asp:GridView ID="GridView2" runat="server" AllowPaging="True" AllowSorting="True" onpageindexchanging="GridView1_PageIndexChanging" onrowdatabound="GridView1_RowDataBound" PageSize="3" ShowFooter="True" CellPadd
阅读全文
摘要:public class SqlHelp { public static int ExecuteNonQuery(string sql, params SqlParameter[] pms) { string conStr = ConfigurationManager.ConnectionStrings["connStr"].ConnectionString; SqlConnection conn = new SqlConnection(conStr); conn.Open();...
阅读全文
摘要:C#日期相减的的方法 DateTime t1 = DateTime.Parse("2005-01-01"); DateTime t2 = DateTime.Parse("2006-01-01"); System.TimeSpan ts = t2 - t1; int days = ts.Days;
阅读全文