摘要:
<%: ViewData["Message"] %>冒号的绑定可以自动转换HTML编码的代码(所以我一直无法在前台显示我在后台拼接的HTML代码,而使用 Response.Write(pager.MvcPager()) 又是正常显示的)<%= Model.ModelPagerHtmls %>等号的绑定没有这种机制 阅读全文
摘要:
Html.TextBoxis not strongly typed and it doesn't require a strongly typed view meaning that you can hardcode whatever name you want as first argument and provide it a value:<%= Html.TextBox("foo", "some value") %>You can set some value in theViewDatadictionary inside th 阅读全文
摘要:
new FileInfo(f).Attributes = FileAttributes.Normal; File.Delete(f);设置文件属性为Normal,然后再执行删除操作。 阅读全文
摘要:
C#里面,重命名文件时,没有rename这个功能,使用的是FileInfo.MoveTo的方式,MoveTo 到原目录里一个新的名字,即实现了重命名 string newName = txtFileName.Text.Trim(); string oldName = Request.QueryString["fileName"]; RSPSession sessionRsp = (RSPSession)Session["RSPSetting"]; string basePat... 阅读全文
摘要:
1.打开thickbox.js 文件.2.搜索urlNoQuery找到如下代码:if(url.indexOf('TB_iframe') != -1){urlNoQuery = url.。。。之类把这里的 urlNoQuery句替换为:urlNoQuery=url;这是因为原文件中语句删除了url的所有参数,为了传递参数,必须使用原来的url。修改后的部分: if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window //urlNoQuery = url.split('T... 阅读全文
摘要:
在实现自己的Handler的时候只需要继承IHttpHandler接口就行了,在Handler中使用Session时,只需要继承一下IRequiresSessionState就行了指定目标 HTTP 处理程序需要对会话状态值具有读写访问权。这是一个标记接口,没有任何方法。在自定义 HTTP 处理程序中实现IRequiresSessionState接口,以确定处理程序是否需要对会话状态值具有读写访问权。http://msdn.microsoft.com/zh-cn/library/system.web.sessionstate.irequiressessionstate.aspx 阅读全文
摘要:
原文地址:http://www.cnblogs.com/seesea125/archive/2012/03/30/2425281.html本人也是coding很多年,虽然很失败,但也总算有点失败的心得,不过我在中国,大多数程序员都是像我一样,在一直走着弯路,如果想成为一个架构师,就必须走正确的路,否则离目标越来越远,正在辛苦工作的程序员们,你们有没有下面几种感觉?一、 我的工作就是按时完成领导交给我的任务,至于代码写的怎样,知道有改进空间,但没时间去改进,关键是领导也不给时间啊。二、 我发现我的水平总是跟不上技术的进步,有太多想学的东西要学,Jquery用的人最近比较多啊,听说最近MVC比较火 阅读全文
摘要:
A Postback occurs when the data (the whole page) on the page is posted from the client to the server..ie the data is posted-back to the server, and thus the page is refreshed (redrawn)...think of it as 'sending the server the whole page (asp.net) full of data'.
On the other hand, a callback is also a special kind of postback, but it is just a quick round-trip to the server to get a small set of data (normally), and thus the page is not refreshed, unlike with the postback...think of it as 'cal 阅读全文
摘要:
动态查询语句:之所以叫做动态查询语句是因为语句中使用的某些值,甚至之句将在运行时而不是编译时才能被最终决定。在编写查询语句时,还不能得到执行查询所需要的信息,因为这些信息可能会来自用户输入或者程序运行时的上下文,甚至在一些更高级的应用中,我们可能需要在程序运行时从无到有地完整创建出一个查询。比如,若应用程序需要查询来自多种地方的数据,例如XML文件、远程应用程序或用户等。我们可以使用最终的武器——表达式树。 阅读全文
摘要:
使用的数据源类型: static public class SampleData { static public Publisher[] Publishers = { ... 阅读全文
摘要:
/// <summary> /// 过滤标记 /// </summary> /// <param name="NoHTML">包括HTML,脚本,数据库关键字,特殊字符的源码 </param> /// <returns>已经去除标记后的文字</returns> public static string NoHTML(string Htmlstring) { if (Htmlstring == null) { return ""; } else { ... 阅读全文
摘要:
javascript的实现代码如下: function QueryString(fieldName) { var urlString = document.location.search; if(urlString != null) { var typeQu = fieldName+"="; var urlEnd = urlString.indexOf(typeQu); if(urlEnd != -1) { var paramsUrl = u... 阅读全文
摘要:
限制用户输入不符合规范的数字与小数点导致不好计算价格问题,特整理了下面的代码,需要的朋友可以参考下。<html> <head> <title>text 数字</title> <meta http-equiv="Content-Type" content="text/html; charset=gbk"> </head> <script type="text/javascript"> function check(event) { var e = win 阅读全文
摘要:
如下html代码:<input id="rad" name="rad" type="radio" value="1"/><input id="rad" name="rad" type="radio" value="2"/><input id="rad" name="rad" type="radio" value="3"/> 阅读全文
摘要:
在最近的项目中使用到了ajax来批量导入更新数据,第一次提交正常,后面提交同样的订单就有问题了。订单明明已经处理了,可是界面还是提示没有处理。
查找了下原因,原来是ajax的缓存问题造成。
解决方法如下: 阅读全文
摘要:
javascript获取到textarea文本框中的字符串中,如果包含有回车换行符,在字符串中表现为“\n”,而不是我们通常所见的“\r\n”。 阅读全文
摘要:
OPENXML 通过 XML 文档提供行集视图。由于 OPENXML 是行集提供程序,因此可在会出现行集提供程序(如表、视图或 OPENROWSET 函数)的 Transact-SQL 语句中使用 OPENXML。 阅读全文
摘要:
数据库备份后恢复到其它服务器上, 就会发生登录名丢失的问题
用以下语句重新关联 阅读全文