摘要: 上学期听老师说,要参加软考 测试一下自己,我原本以为考程序员很难就准备了一个多月,买了套真题卷和模拟卷,做题目的时候 感觉还就那回事,模拟卷很难,但是当参见考试的时候,觉得考得很简单,我回来后仔细的看看这几年的考试,就是一年比一年容易,那我们考这些证书的含金量也可想而知。。。哎 阅读全文
posted @ 2012-05-27 08:54 独剑 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 先在winform中添加notifyIcon控件,然后激活相应事件,添加代码。因为屏蔽了关闭窗体事件,可以设定一个全局变量bool变量来分辨是哪里引起的close事件。//全家变量boolcloseTag=true;//最小化privatevoidform1_Resize(objectsender,EventArgse){if(this.WindowState==FormWindowState.Minimized){NormalToMinimized();}}//close时最小化privatevoidform1_FormClosing(objectsender,FormClosingEve. 阅读全文
posted @ 2012-05-20 12:10 独剑 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 这是一个GridView控件分页问题,如果是使用的VS中自身提供的数据源控件的话,没什么问题,直接可以选择"分页"功能,可是如果自己用代码设置数据源时就易出现这样的错误-------GridView“GridView1”激发了未处理的事件“PageIndexChanging”.解决方法是:给GridView控件添加一个事件PageIndexChanging,并设置GridView的属性:AllowPaging="True"protectedvoidGridView1_PageIndexChanging(objectsender,GridViewPageE 阅读全文
posted @ 2012-05-20 12:08 独剑 阅读(863) 评论(0) 推荐(0) 编辑
摘要: 只需在web.config文件中写下如下字段<configuration><appSettings><addkey="索引值"value="数据库连接字符串"/></appSettings></configuration>在页面只中调用如果没有ConfigurationManager类应引入usingSystem.Configuration;命名空间stringconnStr=ConfigurationManager.AppSettings["索引值"].ToString() 阅读全文
posted @ 2012-05-20 12:08 独剑 阅读(152) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Configuration;using System.Data;using System.Data.SqlClient;/// <summary>/// 实现在页面中的Gridview中的数据以word或excel的格式导出/// </summary>public partial class GridViewByWor 阅读全文
posted @ 2012-05-20 12:07 独剑 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 在数据库中激活,在安全性登录名找到ASP.NET,并添加。,使其对该表有读和写的权限。 阅读全文
posted @ 2012-05-20 12:06 独剑 阅读(182) 评论(0) 推荐(0) 编辑
摘要: //在RowDataBound中写入以下代码protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate) { //Cells获取删除按钮所在的列 要更具删除按钮所在的列来定,由于我的删除是采用图片 / 阅读全文
posted @ 2012-05-20 12:05 独剑 阅读(185) 评论(0) 推荐(0) 编辑