tooltip要手动激活的好不好,还有那个popover,需要tooltip跟手动激活。
下面来说说那个tooltip的使用,先引用下官方的原话:
For performance reasons,
the tooltip and popover data-apis are opt in,
meaning you must initialize them yourself.
翻译过来就是:出于性能原因的考虑,tooltip和popover的data-apis是可... 阅读全文>>
MVC使用Ajax.BeginForm上传图片时HttpPostedFileBase file为null,Request.Files获取不到文件,问题分析是页面中存在jquery.unobtrusive-ajax.js文件,注释后能够获取到。改为Html.BeginForm实现如下:
@using (Html.BeginForm("UploadPhoto", "EditUserInfo", FormMethod.Post, new { enctype = "multipart/form-data" })) { 选择图片: <input type="file" name="uploa 阅读全文>>
百度接口相关说明:http://developer.baidu.com/map/ip-location-api.htm
返回是json格式,首先构建相关反系列化类:
#region AddressForQueryIPFromBaidu [Serializable] public class AddressForQueryIPFromBaidu { public string Address { get; set; } public Content Content { get; set; 阅读全文>>
常用正则表达式
正则表达式用于字符串处理、表单验证等场合,实用高效。现将一些常用的表达式收集于此,以备不时之需。
匹配中文字符的正则表达式: [\u4e00-\u9fa5]
评注:匹配中文还真是个头疼的事,有了这个表达式就好办了
匹配双字节字符(包括汉字在内):[^\x00-\xff]
评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)
匹配空白行的正则表达式:\n\s*\r
评注:可... 阅读全文>>
在asp.net mvc的强类型视图(strongly typed view)使用下拉列表,在Controller中设定的选择项在View上选中失效
下面是我的代码:
public ActionResult Create(int id=0,int parentid=0) { var productCategory=db.ProductCategorys.Where(pc => pc.ParentID == parentid).ToList(); productCategory.Insert(0,new ProductCategoryModel() { Name = "顶级分 阅读全文>>
mvc使用Area分区开发后,存在在不同Area间跳转,需要为每个区间添加Area规则,如下:
public class CompanyAreaRegistration : AreaRegistration { public override string AreaName { get { return "Company"; } } public override void RegisterArea(AreaRegistrationContext context) { context 阅读全文>>
热门文章
- MVC4使用[Authorize(Roles="admin" - 218234次
- 微信公众号接口:40016 invalid bu - 62762次
- MVC上传文件时HttpPostedFileBase - 36413次
- 微信公众平台接口进行开发Token验... - 33777次
- 黑客十五年:寻找被黑金毁掉的黑客 - 31512次
- 黑市交易 – 女性肉鸡价格比男性贵 - 29595次
- SQL、LINQ与Lambda随机取N条数据 - 29486次
- Beyond Compare 4 key 注册码 - 28351次
- Windows下netsh端口转发进行渗透 - 28224次
- 【原创】微信公众平台接口调试工具 - 26309次