protected void Button1_Click(object sender, EventArgs e){ string b = TextBox1.Text; //截取前两位 123a4a4b5b6 12 //string c = b.Substring(0, 2); //TextBox1.Text = c; //截取后两位 123a4a4b5b6 56 //string c = b...
1、前端.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...
Math.Round:四舍六入五取整Math.Ceiling:向上取整,只要有小数都加1Math.Floor:向下取整,总是舍去小数
//按钮生成事件protected void Button1_Click(object sender, EventArgs e) {string number = "2017101600001";//编号 //number是对应word中的number标签string createdate = "2017-10-16";//日期 //createdate是对应word中的number标签s...
控制器Controllerspublic ActionResult Index(int pageIndex = 1){ if (pageIndex < 1){pageIndex = 1; //最少为第一页}int pageSize = 10; //每页显示数string cond = ""; //条件int total = new DAL.ArticleDAL().CalcCount(cond); /...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>&l...
if (!Page.IsPostBack){ string userAgent = Request.UserAgent; //获取客户浏览器的信息 if (userAgent.ToLower().Contains("micromessenger")) //micromessenger 微信浏览器内核 { Response.Writ...
/// <summary>长文本分页/// /// </summary>/// <param name="p_strContent"></param>/// <returns></returns>public string OutputBySize(string p_strContent) //分页函数 {string m_strRet =...
<asp:TextBox ID="txt_Pname" runat="server" TextMode="Password"></asp:TextBox> 当?TextBox TextMode为Password从数据库绑定时 this.txt_Pname.Text = table.Rows[0]["Title"].ToStri...
后台----------------------------------------------------------------------------------------------------------------//绑定private void Band(){this.CheckBoxList1.DataSource = temManager.templateList();this.CheckBoxList1.DataT...