上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 19 下一页
  2012年3月20日
摘要: 一次在帮朋友做学校自动选课的程序时,碰到了一个问题。 之初我是想通过JS自动刷新页面来不断提交达到选课命中率高的目的。 但在编写代码时,发现手工点击提交按钮可以正常提交,但用js写的<>WebForm7_1.submit();</>提交后服务端却不处理......足足搞了一个多小时,还是没搞定。结果打算放弃...... 第二天,闲来无事,再次想起这个问题,于是有了一定要解决这个问题的冲劲,再分析,再调试,最终发现了问题所在....原来点击submit或button时,表单同时会把submit的传到服务端.. 而用JS脚本submit();提交时,没有触发submit按钮 阅读全文
posted @ 2012-03-20 13:40 cw_volcano 阅读(512) 评论(0) 推荐(0) 编辑
  2012年3月19日
摘要: //遍历option和添加、移除optionfunction changeShipMethod(shipping){ var len = $("select[@name=ISHIPTYPE] option").length if(shipping.value != "CA"){ $("select[ 阅读全文
posted @ 2012-03-19 18:15 cw_volcano 阅读(229) 评论(0) 推荐(0) 编辑
摘要: $("#FormReport").submit(); $("#FormControlContribution").submit(); $("#FormHealthCheck").submit();<% using (this.Html.BeginForm("Edit", "Report", FormMethod.Post, new { id = "FormReport", target="IframeReport" })){ %>......& 阅读全文
posted @ 2012-03-19 18:14 cw_volcano 阅读(1502) 评论(0) 推荐(0) 编辑
  2012年2月15日
摘要: //实际项目中的使用public void QueryDownLoadAttachment(int id) { using (IUnitOfWork context = IocServiceFactory.Resolve<IUnitOfWork>()) { string storageDir = System.Configuration.ConfigurationManager.AppSettings["resourceStorageRoot"].ToString().Replace("\\\\", "\\... 阅读全文
posted @ 2012-02-15 11:19 cw_volcano 阅读(235) 评论(0) 推荐(0) 编辑
  2012年2月10日
摘要: Gratte.Aurora.Data.Models.Entity.csGratte.Aurora.Data.Models.DataModelQueries.cs<% if (this.Page.User.hasWASPPSpermission("ENTITYPROTECTIONPLAN", "A")) {%>this.Page.User.IsInRoles( SecurityGroups.Translators )fnLib.userName() 返回 return HttpContext.Current.User.Identity.Name 阅读全文
posted @ 2012-02-10 16:33 cw_volcano 阅读(304) 评论(0) 推荐(0) 编辑
  2012年2月9日
摘要: 方式一:事先写好多个input.在点击时才显示。也就是说上传的最大个数是写死了的。html<p><ahref='#'onclick='javascript:viewnone(more1)'>添加附件</a><divid='more1'style='display:none'><inputtype="file"name="attach1"size="50"javascript:viewnone(more2)>< 阅读全文
posted @ 2012-02-09 17:57 cw_volcano 阅读(1154) 评论(0) 推荐(0) 编辑
  2012年2月1日
摘要: SQL脚本修改表结构 新建表:create table [表名]([自动编号字段] int IDENTITY (1,1) PRIMARY KEY ,[字段1] nVarChar(50) default '默认值' null ,[字段2] ntext null ,[字段3] datetime,[字段4 阅读全文
posted @ 2012-02-01 17:05 cw_volcano 阅读(536) 评论(0) 推荐(0) 编辑
摘要: string数组类型转换为int数组.方法一:ConvertAll的用法publicstaticintStrToInt(stringstr){returnint.Parse(str);}string[]arrs=newstring[]{"100","300","200"};int[]arri=Array.ConvertAll(arrs,newConverter<string,int>(StrToInt));方法二:使用数组循环分别转换。string[]str1=newstring[]{"100",&qu 阅读全文
posted @ 2012-02-01 12:01 cw_volcano 阅读(2940) 评论(0) 推荐(0) 编辑
摘要: 1.验证提示信息:View:<%=Html.ValidationSummary("") %>Controller:ModelState.AddModelError("Error", "您提交的信息还未通过审核!");if ((!this.ModelState.IsValid)) return this.RedirectWithErrors(this.View(DeleteViewName, viewModel), viewModel.GetErrors());2.确认数据库连接没有忘记关闭:protected overri 阅读全文
posted @ 2012-02-01 08:56 cw_volcano 阅读(370) 评论(0) 推荐(1) 编辑
  2012年1月30日
摘要: 1.public IEnumerable<RiskInfo> GetRisksByUsername() { AuroraDataContext db = new AuroraDataContext(); var list = db.GetRisksByUsername().Select(c => new RiskInfo { Number = c.Number, Name = c.Name });return list; }public class RiskInfo { public int? Number { get; set; } public string Name { 阅读全文
posted @ 2012-01-30 09:11 cw_volcano 阅读(373) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 19 下一页