上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页
摘要: stringdeptId=Request.Form["depts"].Trim();Html.DropDownList()赋默认值:页面代码如下: list = new List { new SelectListItem { Text = "启用", Value = "0",Selected = ... 阅读全文
posted @ 2014-05-17 23:44 MrMrCash 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 关于ASP.net MVC 中DropDownList绑定与提交数据在做 ASP.net MVC项目中,数据绑定也是很关键的,现在以个人经验与大家交流下 ASP.net MVC 中DropDownList绑定与提交数据,由于数据查询较为简单就不列出来了,具体看核心代码部分吧。数据表:DropDown... 阅读全文
posted @ 2014-05-17 23:43 MrMrCash 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 1.介绍客户端模型是SharePoint 2010才提供的,可以更灵活的在任何客户端设备中操作SharePoint对象,在2007版本中没有客户端模型,2010中有三种客户端模型JavaScript,SilverLight,.NET Managed。下面是对比情况: 2.原理当我们使用客户端模型访问... 阅读全文
posted @ 2014-05-14 22:48 MrMrCash 阅读(736) 评论(0) 推荐(0) 编辑
摘要: div浮动 aaaaaa bbbbbb cccccc dddddddddddd div浮动 aaaaaa b... 阅读全文
posted @ 2014-05-10 12:51 MrMrCash 阅读(367) 评论(0) 推荐(0) 编辑
摘要: public ActionResult GetAllList() { var list = db.Movies.ToList(); return Json(list, JsonRequestBehavior.AllowGet); //return Content(a); }@section Sc... 阅读全文
posted @ 2014-05-09 00:46 MrMrCash 阅读(212) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using iFlytekDemo.Models;namespace iFlytekDemo.Controllers{ public class CitiesController : Controller { private readonly ICityRepository cityRepository; // If you are using D... 阅读全文
posted @ 2014-05-01 14:18 MrMrCash 阅读(297) 评论(0) 推荐(0) 编辑
摘要: using System.Collections.Generic;using System.ComponentModel.DataAnnotations;namespace iFlytekDemo.Models{ /// /// 城市实体 /// public class City { /// /// 城市编号 /// [Key] public int CityID { get; set; } /// /// 城市名称 /// ... 阅读全文
posted @ 2014-05-01 14:12 MrMrCash 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 假设cshtml文件中是这样的:data是json数据。传递到的Action是/Home/MyAjax。那么在Action方法处接收的方式如下:public ActionResult MyAjax(string val1) { string val2 = Requ... 阅读全文
posted @ 2014-05-01 14:09 MrMrCash 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 在上一篇介绍MVC中的Ajax实现方法的时候,曾经提到了除了使用Ajax HTML Helper方式来实现之外,Jquery也是实现Ajax的另外一种方案。通过get方法实现AJax请求ViewClick MeControllerpublic ActionResult GetTime(){ r... 阅读全文
posted @ 2014-05-01 14:06 MrMrCash 阅读(1387) 评论(0) 推荐(0) 编辑
摘要: 使用asp.net mvc 调用Action方法很简单。一、无参数方法。1、首先,引入jquery-1.5.1.min.js 脚本,根据版本不同大家自行选择。2、在Controllers中书写前台Ajax需要调用的Action,比如:public ActionResult test1() ... 阅读全文
posted @ 2014-05-01 14:05 MrMrCash 阅读(445) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页