摘要: 1///<summary>2///限制产品名称个数3///</summary>4protectedboolLimitProductName()5{6char[]textstr=(txtProductName.Text).ToString().ToCharArray();7inttemp=0;8boolresult=true;9for(intj=0;j<textstr.Length;j++)10{11if(textstr[j]=='')12{13temp++;14}1516}17string[]name=txtProductName.Text.Spl 阅读全文
posted @ 2011-12-05 16:41 做最好の自己 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1for(inti=0;i<chlproductstander.Items.Count;i++)2{3if(chlproductstander.Items[i].Selected)4{5if(chlproductstander.Items[i].Text.IndexOf("其它")!=-1)6{7txtproductstander.Visible=true;8lbproductstander.Visible=true;9}10}11else12{13txtproductstander.Visible=false;14lbproductstander.Visible=f 阅读全文
posted @ 2011-12-05 16:39 做最好の自己 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 1///<summary>2///初始化CheckBoxList中哪些是选中了的</summary>3///<paramname="checkList">CheckBoxList</param>4///<paramname="selval"></param>5///<paramname="separator"></param>6publicstaticstringSetCheckBoxList(CheckBoxListcheckList,s 阅读全文
posted @ 2011-12-05 16:36 做最好の自己 阅读(882) 评论(0) 推荐(0) 编辑
摘要: 1///<summary>2///得到CheckBoxList中选中了的值3///</summary>4///<paramname="checkList">CheckBoxList</param>5///<paramname="separator">分割符号</param>6///<returns></returns>7publicstaticstringGetCheckListText(CheckBoxListcheckList)8{9stringselva 阅读全文
posted @ 2011-12-05 16:33 做最好の自己 阅读(1103) 评论(0) 推荐(0) 编辑
摘要: 并实现添加下拉选择项1///<summary>2///绑定产品子类别3///</summary>4privatevoidBindType(stringtype)5{6DAL.Comm_SysDataDicSysDic=newDAL.Comm_SysDataDic();7DataSetds=SysDic.GetList("DicType='"+type+"'");8ddltype.DataSource=ds.Tables[0].DefaultView;;9ddltype.DataTextField="Dic 阅读全文
posted @ 2011-12-05 16:26 做最好の自己 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1例如:1.ToString("000")数字格式化后为00123///<summary>4///生成备案号5///</summary>6///<returns></returns>7protectedstringTMaterialNo()8{9stringstrNo="";10boolflag=false;11List<Model.T_MaterialBackUp>mlist=newBLL.T_MaterialBackUp().GetModelList("CompanyUserID= 阅读全文
posted @ 2011-12-05 16:17 做最好の自己 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 获得当前文件夹下的文件名:stringpath="/MaterialBackUp"+Request.Path.Substring(Request.Path.LastIndexOf('/')例如:返回/MaterialBackUp/login.aspx 阅读全文
posted @ 2011-12-05 16:13 做最好の自己 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1实现弹出对话框,选择“确定”与“取消”的对应操作!2this.ClientScript.RegisterStartupScript(typeof(string),"alert","if(confirm('您第一登录系统,请修改密码?')==true){location.href='index.aspx?updatepwd=yes';}else{location.href='index.aspx?updatepwd=no';}",true); 阅读全文
posted @ 2011-12-05 15:50 做最好の自己 阅读(584) 评论(0) 推荐(0) 编辑
摘要: 实现DIV的水平居中1<divstyle="width:90%;text-align:left; margin:0auto;"> 阅读全文
posted @ 2011-12-05 15:45 做最好の自己 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 1//邮编的正则表达式2varcode=/^[0-9][0-9]{5}$/;3//手机号码的正则表达式不明确以后有多少,所以就0-94varmobile=/^(13[0-9]|15[0-9]|18[0-9])\d{8}$/;5//匹配目前可用的前三位手机号码6varS_tel=/^(13[0-9]|15[0|3|6|7|8|9]|18[8|9])\d{8}$/;7//固定电话的正则表达式,可匹配手机以及分机8vartel=/^((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d 阅读全文
posted @ 2011-12-05 15:40 做最好の自己 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 查看代码1privateSystem.Xml.XmlDocumentxmldoc;2protectedvoidddlprovince_SelectedIndexChanged(objectsender,EventArgse)3{4stringprovincename=this.ddlprovince.SelectedItem.Text;5//ListItemCollectionlis=this.ddlprovince.Items;6this.ddlcity.DataSource=GetCityByname(provincename);7this.ddlcity.DataBind();8}910 阅读全文
posted @ 2011-12-05 15:34 做最好の自己 阅读(1250) 评论(0) 推荐(0) 编辑
摘要: 全国区号与邮政编码xml文件<?xml version="1.0" encoding="utf-8"?><area Country="China"> <province ID="0" provinceID="000000" province="--请选择--"> <City CityID="000000" City="--请选择--" /> </province> <pr 阅读全文
posted @ 2011-12-05 15:24 做最好の自己 阅读(2090) 评论(1) 推荐(0) 编辑
摘要: 1///<summary>2///模板列处理3///</summary>4///<paramname="gv"></param>5publicvoidPrepareGridViewForExport(Controlgv)//模式化特殊元素flashcong6{7LinkButtonlb=newLinkButton();8Literall=newLiteral();9stringname=String.Empty;10for(inti=0;i<gv.Controls.Count;i++)11{12if(gv.Control 阅读全文
posted @ 2011-12-05 15:19 做最好の自己 阅读(3542) 评论(0) 推荐(0) 编辑