随笔分类 - C#
摘要:C货币2.5.ToString("C")¥2.50D十进制数25.ToString("D5")00025E科学型25000.ToString("E")2.500000E+005F固定点25.ToString("F2")25.00G常规2.5.ToString("G")2.5N数字2500000.To...
阅读全文
摘要://解密:stringdataPWD=System.Text.Encoding.Default.GetString(Convert.FromBase64String(PasdataPWD.Replace("%2B","+")));//加密:stringpasNewPwd=Convert.ToBase...
阅读全文
摘要:图表+tableprotectedvoidButton3_Click(objectsender,EventArgse){Response.Clear();Response.Buffer=true;Response.Charset="GB2312";Response.AppendHeader("Con...
阅读全文
摘要:voidchartbind(stringstrDept){DataSetds=newDataSet();for(inti=1;i<=3;i++){//连接数据库,并插入数据SqlParameter[]sqlParam=newSqlParameter[4];sqlParam[0]=newSqlPara...
阅读全文
摘要:/**//******************************************************************************\*类名:DBAccess*功能:*对数据库进行操作的一些常用方法*原作者:PeterZDZhang*Date:2006/09/25*...
阅读全文
摘要:voidbind(){stringd="";stringp="%";stringstrText="";//绑定table1for(intj=1;j=1;i--){if(j==1)d="D000";elseif(j==2)d="M000";elseif(j==3)d="P000";elseif(j==...
阅读全文
摘要:stringstrsql=".......";try{DataSetds=db.GetDataSet(strsql);strText=ds.Tables[0].Rows[0][0].ToString()+"%";}catch{strText="ERROR";}
阅读全文
摘要:Response.Write("");
阅读全文
摘要://初始化job_RankstringstrSql="select*fromcode_listwherepms_type='job_rank'";DataSetdsJobrank=DBAccess.GetDataSet(strSql);drpJobRank.DataSource=dsJobrank....
阅读全文
摘要:System.Web.Mail(.NET1.x)1.引用: usingSystem.Web.Mail;2.//MailMailMessagemailObj=newMailMessage();StringWritersWriter=newStringWriter();HtmlTextWriterht...
阅读全文
摘要:VB.NET and C# ComparisonThis is a quick reference guide to highlight some key syntactical differences between VB.NET (version 2) and C#. Hope you find...
阅读全文
摘要:1.Login.aspxAD验证技术~用户名密码DomainDTDTS2.Login.aspx.vbImportsSystem.Web.SecurityImportsSystem.TextPrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsS...
阅读全文
摘要:try{//try的内容。一般为page_load所有内容}catch(Exceptionex){SaveError(ex,this.Context,this.Request);}err程序:publicstaticvoidSaveError(Exceptionex,HttpContexthc,Ht...
阅读全文
摘要:System.DateTimecurrentTime=newSystem.DateTime();currentTime=System.DateTime.Now;intyear=currentTime.Year;intmonth=currentTime.Month;intday=currentTime...
阅读全文
摘要:summary.aspx.csusingSystem.Web.Mail;usingSystem.Data.OleDb;usingSystem.Text;usingSystem.Configuration;usingSystem.IO;usingExcel;publicstaticstringstrC...
阅读全文
摘要:1.Form.cs:usingCC=System.Web.Mail;usingSystem.Data.SqlClient;usingSystem.Data.OleDb;usingSystem.Diagnostics;privatevoidtimer1_Tick(objectsender,System...
阅读全文
摘要:陈铭Microsoft C#/.NET Asia MVP难度:4/10.NET是面向网络应用和服务的开发平台,那么就让我们从一个简单的网络应用开始吧——虽然这并不是本章节要讨论的主题。//hello.cs:SayHellototheInternetusingSystem;usingSystem.Ne...
阅读全文
摘要:由于需要使用MS的AD用户验证的功能,使AD用户认证成为公司的唯一用户认证的系统,因此,最后一直在找AD用户验证的资料,还好, 找到了如下的资料,非常不错,值得一看!!! 当然,还找到了更好的资源: 通过C#写的一个AD管理的类:http://www.c-sharpcorner.com/Code/2...
阅读全文
摘要:经过两天的摸索,在网上搜集了大量的资料,总算是把打印部分搞定了,现在给大家分享一下心得:在此之前,我先介绍一下Execb用法:1. 插入引用:2. 在body里写此类似代码:ExeCB常用参数说明: WebBrowser.ExecWB(1,1) 打开 Web.ExecWB(2,1) 关闭现在所有...
阅读全文

浙公网安备 33010602011771号