上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 47 下一页
摘要: <add name="ProwebEntities" connectionString ="Data Source=.;Integrated Security=true;Initial Catalog=Saienyitai;User ID=sa;Password=sa;MultipleActiveResultSets=true" providerName ="System.Data.SqlClient"/>注意在连接字符串里一定要添加:Integrated Security=true;这样就可以自动删除SQL数据库里的表并 阅读全文
posted @ 2013-06-18 14:36 James·wang 阅读(1275) 评论(0) 推荐(0)
摘要: Html.RenderPartial与Html.RenderAction 这个两个方法都是用于把MVC用户控件嵌入到View中。Html.RenderPartial是直接将MVC用户控件嵌入到界面上@{Html.RenderPartial("SupplierList ");} 注意: MVC用户控件必须放在调用者同一目录下,也可以放在View/Shared中。@Html.RenderPartial("~/Views/ Supplier/SupplierList.ascx"); 指明MVC用户控件所放的具体目录。Html.RenderAction是通过Co 阅读全文
posted @ 2013-06-18 13:36 James·wang 阅读(10053) 评论(0) 推荐(1)
摘要: 登录之前判断Cookies是否存在,并判断登录错误次数if (Request.Cookies["loginnum"] != null) { if (Request.Cookies["loginnum"].Value == "3") return Content("<script language='javascript' type='text/javascript'>alert('已经发生 3 次错误!请30分钟再重新查询,谢谢!');history.go(-1); 阅读全文
posted @ 2013-06-09 10:42 James·wang 阅读(2043) 评论(1) 推荐(0)
摘要: 1、创建Cookies有两种方法:Response.Cookies["userName"].Value = "patrick";Response.Cookies["userName"].Expires = DateTime.Now.AddDays(1);HttpCookie aCookie = new HttpCookie("lastVisit");aCookie.Value = DateTime.Now.ToString();aCookie.Expires = DateTime.Now.AddDays(1);Re 阅读全文
posted @ 2013-06-08 17:42 James·wang 阅读(26581) 评论(1) 推荐(6)
摘要: $(function () { $("#btn").click(function () { var usercode = $("#UserCode").val(); var verifycode = $("#Verifycode").val(); if ($.trim(usercode) == "" || $.trim(verifycode) == "") { alert(" 您的[客户号]或者[验证码]必须填写!"); return false;... 阅读全文
posted @ 2013-06-08 12:41 James·wang 阅读(40803) 评论(1) 推荐(0)
摘要: 错误提示:说明:执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息:System.Data.SqlClient.SqlException: 此版本的 SQL Server 不支持用户实例登录标志。该连接将关闭。原因:<connectionStrings> <add name="BlogConnectionString" connectionString="Data Source=.;AttachDbFilename=|DataDirectory|\Blog.mdf;I 阅读全文
posted @ 2013-06-08 09:30 James·wang 阅读(872) 评论(0) 推荐(0)
摘要: @{Html.RenderAction("GenreMenu", "Store");}@{Html.RenderPartial("HistoryList", Model);} 阅读全文
posted @ 2013-06-07 16:41 James·wang 阅读(401) 评论(0) 推荐(0)
摘要: var lambda=_db.Accounts.Join(_db.AccSubTypes,ac=>ac.Invoice,ast=>ast.Astid,(ac,ast)=>new {ac,ast}) .Join(_db.AccSubTypes,bc=>bc.ac.Schedule,bst=>bst.Astid,(bc,bst)=>new{bc,bst}) .Join(_db.AccSubType... 阅读全文
posted @ 2013-06-07 14:38 James·wang 阅读(1429) 评论(0) 推荐(0)
摘要: return Content("");返回并刷新页面:return Content("");context.Response.ClearContent();context.Response.Write(""); 阅读全文
posted @ 2013-06-06 22:47 James·wang 阅读(1014) 评论(0) 推荐(0)
摘要: TimeSpan表示一个时间段实例,两个时间的差就是一个TimeSpan实例。1、TimeSpan.Minutes——其他时间都一样,比较分钟的差,同样的还有:Hours,Second2、TimeSpan.TotalDays——两个时间段相差的日数,同样的还有:TotalHours,TotalMinutes,TotalSecondsstring time1 = "2013-6-6 8:10:00";string time2 = "2013-6-7 18:20:10";DateTime t1 = DateTime.Parse(time1);DateTime 阅读全文
posted @ 2013-06-06 20:40 James·wang 阅读(807) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 47 下一页