摘要: protected void Button1_Click(object sender, EventArgs e) { int number =Convert.ToInt32(TextBox1.Text.ToString().Trim()); int tid =Convert.ToInt32(TextBox2.Text.ToString()... 阅读全文
posted @ 2013-04-08 19:04 侯伟东 阅读(203) 评论(0) 推荐(0)
摘要: //生成HTM页 public static bool WriteFile(string strText, string strContent, string strAuthor) { string path = HttpContext.Current.Server.MapPath("news/"); Encoding code = E... 阅读全文
posted @ 2013-04-03 22:15 侯伟东 阅读(157) 评论(0) 推荐(0)
摘要: Response.Write("<script>alert('登录成功!!!')</script>"); 阅读全文
posted @ 2013-04-01 15:12 侯伟东 阅读(121) 评论(0) 推荐(0)
摘要: 使用数据集就可以了 阅读全文
posted @ 2013-03-29 16:53 侯伟东 阅读(219) 评论(0) 推荐(0)
摘要: if (((TextBox)(DetailsView1.FindControl("TextBox1"))).Text.ToString().Trim() == "hh") { Response.Write("ok"); } 阅读全文
posted @ 2013-03-28 20:32 侯伟东 阅读(185) 评论(0) 推荐(0)
摘要: /// <summary> /// 将指定字符串按指定长度进行剪切, /// </summary> /// <param name= "oldStr "> 需要截断的字符串 </param> /// <param name= "maxLength "> 字符串的最大长度 </param> /// <param na... 阅读全文
posted @ 2013-03-26 16:33 侯伟东 阅读(164) 评论(0) 推荐(0)
摘要: set talk off t=1 go 1 do while .not.eof() *!* 2210/6+1=369.3333333 记录数/每页记录数+1(也得凑够一整页) if t>369 t=1 endif repl ym with str(t,3,0) skip t=t+1 endd *分别按照准考证号和考点出场顺... 阅读全文
posted @ 2013-03-24 21:36 侯伟东 阅读(181) 评论(0) 推荐(0)
摘要: 引用分页控件页面前台 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Src="control/AspnetPager.ascx" TagName="AspnetPager" TagPrefix="uc1" %> <!DO... 阅读全文
posted @ 2013-03-24 14:09 侯伟东 阅读(154) 评论(0) 推荐(0)
摘要: IF OBJECT_ID('jjp_CategoryList_Get') IS NOT NULL DROP PROCEDURE jjp_CategoryList_Get; GO CREATE PROCEDURE jjp_CategoryList_Get ( @pageIndex int, @PageSize int, @Records ... 阅读全文
posted @ 2013-03-24 14:03 侯伟东 阅读(143) 评论(0) 推荐(0)
摘要: private string connectionString = "server=(local);database=database;uid=****;pwd=*** "; //数据库连接字符串 protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { BindDataList(); } } protected void BindDataList() { string strSql = "SELECT * FROM t1"; ... 阅读全文
posted @ 2013-03-24 09:21 侯伟东 阅读(170) 评论(0) 推荐(0)