摘要:
js代码,经调试修改,已经可以兼容FF、IE前台页面引用在页面body标记结束前 添加如下代码 <script type="text/javascript" src="Scripts/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="Scripts/selectColor.js"></script> <script type="text/javascript" 阅读全文
摘要:
需要引用的空间using ICSharpCode.SharpZipLib.Zip;using System.Collections;using System.IO;using System.Net;//ICSharpCode.SharpZipLib.Zip下载网址:http://www.icsharpcode.net/OpenSource/SharpZipLib/ /// <summary> /// 压缩多个文件 并下载 /// <param name="strpath">待压缩的文件路径(物理路径如d://123.txt)</param> 阅读全文
摘要:
1 查找DropDownListFor要绑定的数据源IEnumerable<NewsType> newsTypeList = (from m in db.NewsType select m).ToList();//从数据库中查找数据。SelectList slist = new SelectList(newsTypeList, "TypeId", "TypeName");//将查找出来的数据,转化为列表对象ViewData["List"] = slist;//使用ViewData对象保存列表对象,在页面控件绑定时用到Vie 阅读全文
摘要:
1 进行初始化<%=Html.RadioButtonFor(model => model.TypeState, 0, new { @id = "radio2", @name = "rdolstState" })%>启用 <%=Html.RadioButtonFor(model => model.TypeState, 1, new { @id = "radio1", @name = "rdolstState",@checked=true })%>禁用注意:htmlAbrritbut 阅读全文