摘要:
/// <summary> /// 判断输入的是否为数字 /// </summary> /// <param name="numberString"></param> /// <returns></returns> private bool IsNumber(string numberString) { //判断字符是否是数字,是返回true,不是返回false Regex rCode = new Regex("^[+-]?\\d+(\\.\\d+)?$");//正... 阅读全文
摘要:
///// ///// 导出到Excel lichenghu ///// ///// //public static void ToExcel(DataTable dt) //{ // #region MyRegion // List columnlist = new List(); // columnlist.Add("国家"); // columnlist.Add("省份"); // columnlist.Add("城市"); // columnlist.Add("学校名称"); // columnlist.A 阅读全文
摘要:
Response.Write("<script Language=javascript>window.opener=null;window.open(\"\",\"_self\");window.close(); window.open(\"index.aspx\",\"\",\"left=0,top=0,width=\"+screen.availwidth+\",height=\"+screen.availeheight+\",toolsba 阅读全文
摘要:
方法如下:DateTime.Parse("2008-09-01 12:02:30").ToString("hh:mm:ss"); /// <summary> /// 返回 年 /// </summary> /// <param name="sender"></param> /// <param name="e">时间字符串</param> public string GetYear(string DateString) { if (DateSt 阅读全文
摘要:
Excel, Excel导出的方法 ,类 阅读全文
摘要:
AJAX无刷新 三级联动 阅读全文
摘要:
1、用字符串分隔:usingSystem.Text.RegularExpressions;stringstr="aaajsbbbjsccc";string[]sArray=Regex.Split(str,"js",RegexOptions.IgnoreCase);foreach(stringiinsArray)Response.Write(i.ToString()+"<br>");输出结果:aaabbbccc2、用多个字符来分隔:stringstr="aaajbbbscccjdddseee";strin 阅读全文
摘要:
后台代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using DM;using BLL;namespace UI{ public partial class AddUserImageInfo : Form { UserImageInfoBLL bll = 阅读全文
摘要:
/// <summary> /// 为HttpCookie创建kye,hash存cookie对象的key和值 /// </summary> /// <param name="strKey"></param> /// <param name="hash"></param> public static void AddCookie(string strKey, Hashtable hash) { HttpCookie cookie = HttpContext.Current.R... 阅读全文
摘要:
///一般在Repeater下面的按钮什么的 在后天都调用不到,本来想使用FindControl的 ,但是怎么都不行!最请教了高人,现在与大家分享一下!!代码如下...前台代码:<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" OnClientClick="return confirm('确定要删除此信息?');" CommandArgument='<%#Eval("S 阅读全文