MVC---- DataSet 页面遍历
后台代码:
public override ActionResult Index()
{
DataSet ab = custapp.GetCustomerFollows();
ViewData["activityDs"] = ab;
return View();
}
前台代码:
@using System.Data
$(function () {
jQuery.ajax({
url: "/Business/CustomerFollow/GetList",
data: null,
dataType: "json",
async: false,
btn: null
});
}
@{ foreach (DataRow activities in ((DataSet)ViewData["activityDs"]).Tables[].Rows)
{
<table class="ui-jqgrid-btable ui-common-table table table-bordered" style=" background:#ffffff!important; margin-bottom:30px;">
<tbody>
<tr class="jqgfirstrow">
<td style="height:50px;line-height:50px;">@activities["F_Id"]</td>
<td style="height:50px;line-height:50px;">@activities["F_FullName"]</td>
<td style="height:50px;line-height:50px;">@activities["F_Msisdn"]</td>
<td style="height:50px;line-height:50px;">@activities["F_CreatorTime"]</td>
<td style="height:50px;line-height:50px;">@activities["F_CreatorUserName"]</td>
</tr>
<tr>
<td colspan="">
<textarea id="@activities["F_Id"]" class="ckeditor" id="postContent" ></textarea>
</td>
</tr>
</tbody>
</table>
}}
MVC---- DataSet 页面遍历的更多相关文章
- 学习ASP.NET MVC(七)——我的第一个ASP.NET MVC 查询页面
在本篇文章中,我将添加一个新的查询页面(SearchIndex),可以按书籍的种类或名称来进行查询.这个新页面的网址是http://localhost:36878/Book/ SearchIndex. ...
- MVC 向页面传值方式总结(2)
MVC 向页面传值方式总结 总结发现ASP.NET MVC中Controller向View传值的方式共有6种,分别是: ViewBag ViewData TempData 向普通View页面传一个Mo ...
- MVC 向页面传值方式总结(1)
ViewData传值. HomeController.cs Co de: public ActionResult Index() { ViewData["Title" ...
- MVC中子页面如何引用模板页中的jquery脚本
MVC中子页面如何引用模板页中的jquery脚本 最近在学习mvc,遇到了一个问题:在html页面中写js代码,都是引用mvc5自带的jquery脚本,虽然一拖(将指定的jquery脚本如 jquer ...
- Spring MVC 向页面传值-Map、Model和ModelMap
原文链接:https://www.cnblogs.com/caoyc/p/5635878.html Spring MVC 向页面传值-Map.Model和ModelMap 除了使用ModelAndVi ...
- Spring MVC 向页面传值-Map、Model、ModelMap、ModelAndView
Spring MVC 向页面传值,有4种方式: ModelAndView Map Model ModelMap 使用后面3种方式,都是在方法参数中,指定一个该类型的参数. Model Model 是一 ...
- MVC[xml]页面传值
MVC 各种传值方式 ViewData传值.HomeController.cs Co de: public ActionResult Index(){ ViewData["Titl ...
- Spring MVC 向页面传值-Map、Model和ModelMap https://www.cnblogs.com/caoyc/p/5635878.html
Spring MVC 向页面传值-Map.Model和ModelMap 除了使用ModelAndView方式外.还可以使用Map.Model和ModelMap来向前台页面创造 使用后面3种方式,都是在 ...
- MVC中页面的传值方式总结
MVC中的页面传值,通常指Controller和view之间的数据传递,经常用到的有几种方式,总结如下: 一:ViewData 获取或设置一个字典,其中包含在控制器和视图之间传递的数据.使用ViewD ...
- .net MVC 单页面 多个(行)数据修改
一 /// <summary> /// 参数信息分页请求,前台要设置Form,这样可以当前页多值修改 /// </summary> /// <returns>< ...
随机推荐
- display:table和display:table-cell结合使用
.GoodList{ display :table; height :54px; width :56px; line-height: 14px padding: 0 1 ...
- cookie和session的使用
http://www.cnblogs.com/linguoguo/p/5106618.html 1:在控制器中添加session和cookie @RequestMapping("/getin ...
- [py]django表单不清空实现的2种方法
参考 参考: django实现内容不清空2种方法 django form的作用 1.生成html标签 2.验证输入内容 form生成表单 zhuji/forms.py - 实例化表单 - 定制form ...
- PAT 1049 Counting Ones[dp][难]
1049 Counting Ones (30)(30 分) The task is simple: given any positive integer N, you are supposed to ...
- selenium webdriver处理浏览器Cookie
有时候我们需要验证浏览器中是否存在某个cookie,因为基于真实的cookie 的测试是无法通过白盒和集成测试完成的.WebDriver 提供了操作Cookie 的相关方法可以读取.添加和删除cook ...
- Leetcode: Binary Tree Level Order Transversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, ...
- C#--virtual,abstract,override,new,sealed修饰符学习
1.参考博客 http://www.cnblogs.com/oneword/archive/2009/07/02/1515279.html http://www.cnblogs.com/mygood ...
- 1mysql的安装
1.mysql的安装:(1).在'开始'出搜索 'cmd';(2).打开mysql所在磁盘和文件 并安装 d: d:\>cd mysql d:\mysql>cd bin d:\mysql\ ...
- 聊聊WKWebView
聊一聊WKWebView 前言 由于之前一直在用UIWebView,所以对于WKWebView只是停留在知道,了解的状态,并未深入的去研究.前天一个项目要求支持iOS8以上,要加入一个web界面.在习 ...
- ubuntu常用指令
总结一下常用的linux指令. mark一个linux指令学习和速查的网站:http://man.linuxde.net/ (0) su和sudo:得到root权限 su 切换到root用户 sudo ...