Razor视图下服务器代码给Javascript变量赋值
摘要:namespace Razor.Controllers{ public class JSController : Controller { public ActionResult Index() { List<string> FriendsId = new List<string> { "S1", "S2", "S3", "S4" }; ViewBag.FriendsId = FriendsId; return View(); } }}@{ ViewBag.Title = "Ind
阅读全文
posted @
2013-03-28 18:06
一路前行
阅读(996)
推荐(0) 编辑
Razor中Html.DropDownListFor用法
摘要:Model类:publicclassDSourceModel{[Required][Display(Name="状态")]publicstringSourceStatus{get;set;}}Controller类:publicclassDataSourceController:Controller{publicActionResultDataSrcAdd(){varselectStatusList=newList<SelectListItem>(){newSelectListItem(){Value="1",Text="启用&qu
阅读全文
posted @
2013-03-28 18:02
一路前行
阅读(2797)
推荐(0) 编辑
outlook2010如何初始化设置
摘要:如何初始化outlook2010?1、点击Windows系统左下角的“开始”;2、在“运行”或者“搜索”栏中输入:outlook.exe /importprf .\.prf
阅读全文
posted @
2013-03-19 17:41
一路前行
阅读(2187)
推荐(0) 编辑
Razor中Jquery.validate.js验证
摘要:<!DOCTYPEhtml><html><head><metacharset="utf-8"/><metaname="viewport"content="width=device-width"/><title>Jquery.validate.js示例</title>@Styles.Render("~/Content/css")@Styles.Render("~/Content/Site.css","~/
阅读全文
posted @
2013-03-19 09:58
一路前行
阅读(979)
推荐(0) 编辑
DES可逆加解密
摘要:方法://DES默认密钥向量private static byte[]Keys = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };///<summary>///DES加密字符串///</summary>///<paramname="encryptString">待加密的字符串</param>///<paramname="encryptKey">加密密钥,要求为8位</param>///<returns>加密成功返回加
阅读全文
posted @
2013-03-15 09:55
一路前行
阅读(6821)
推荐(1) 编辑
解决chrome卡死
摘要:环境:win7 64位chrome版本:25(貌似20以后的版本都这样)笔记本:thinkpad e520(集成显卡)症状:用chrome浏览淘宝等网页,经常出现浏览器卡死了情况,点击页面中的任何链接均无反应:1、在地址栏中输入chrome://plugins,找到Adobe Flash Player这个插件,能看到旁边括号中写的(2files),点击右边的详细信息,把其中的一个禁用掉,只留一个flash插件,建议禁用chrome自带的flash插件;2、禁用GPU加速,地址栏输入 chrome://flags,找到“对所有网页执行 GPU 合成 Mac, Windows, Linux”项,.
阅读全文
posted @
2013-03-10 11:03
一路前行
阅读(9456)
推荐(0) 编辑
去掉ul,li元素前面点
摘要:css中 ul { list-style:none;margin:0px;}
阅读全文
posted @
2013-03-07 11:00
一路前行
阅读(319)
推荐(0) 编辑
c#根据公式进行自动计算的实现
摘要:代码:usingSystem;usingSystem.CodeDom.Compiler;usingSystem.Reflection;usingSystem.Text;usingMicrosoft.CSharp;namespaceExpression{///<summary>///计算表达式的类///</summary>publicclassCalculateExpression{///<summary>///接受一个string类型的表达式并计算结果,返回一个object对象,静态方法///</summary>///<paramname=
阅读全文
posted @
2013-03-05 15:03
一路前行
阅读(5664)
推荐(0) 编辑