asp.net mvc3开发系统点滴之二
2011-08-20 17:18
351 查看
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>HotelTest</title>
</head>
<body>
<div>
<table>
<tr>
<th style="width: 150px">
景点名称
</th>
<th style="width: 150px">
景点编号
</th>
<th style="width: 150px">
景区编号
</th>
</tr>
<% foreach (System.Data.DataRow dr in (ViewData["hotel"] as System.Data.DataTable).Rows)
{ %>
<tr>
<td>
<%= dr[2].ToString()%>
</td>
<td>
<%= dr[3].ToString()%>
</td>
<td>
<%= dr[4].ToString()%>
</td>
</tr>
<% } %>
</table>
</div>
</body>
</html>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using SQSMvcSolution.Models;
using SQSMvcSolution.Commans;
using System.Web.Routing;
using SQSMvcSolution.Filters;
using System.Data;
using Discuz.Common;
using Discuz.Config;
namespace SQSMvcSolution.Controllers
{
public class HotelController : Controller
{
//
// GET: /Hotel/
public ActionResult Index()
{
return View();
}
public ActionResult HotelTest(int id)
{
SQSMvcSolution.Models.BLL.Ticket Bl = new SQSMvcSolution.Models.BLL.Ticket();
ViewData["hotel"] = Bl.GetHotelTb(id);
return View();
}
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>HotelTest</title>
</head>
<body>
<div>
<table>
<tr>
<th style="width: 150px">
景点名称
</th>
<th style="width: 150px">
景点编号
</th>
<th style="width: 150px">
景区编号
</th>
</tr>
<% foreach (System.Data.DataRow dr in (ViewData["hotel"] as System.Data.DataTable).Rows)
{ %>
<tr>
<td>
<%= dr[2].ToString()%>
</td>
<td>
<%= dr[3].ToString()%>
</td>
<td>
<%= dr[4].ToString()%>
</td>
</tr>
<% } %>
</table>
</div>
</body>
</html>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using SQSMvcSolution.Models;
using SQSMvcSolution.Commans;
using System.Web.Routing;
using SQSMvcSolution.Filters;
using System.Data;
using Discuz.Common;
using Discuz.Config;
namespace SQSMvcSolution.Controllers
{
public class HotelController : Controller
{
//
// GET: /Hotel/
public ActionResult Index()
{
return View();
}
public ActionResult HotelTest(int id)
{
SQSMvcSolution.Models.BLL.Ticket Bl = new SQSMvcSolution.Models.BLL.Ticket();
ViewData["hotel"] = Bl.GetHotelTb(id);
return View();
}
}
}
相关文章推荐
- asp.net mvc3开发系统点滴之一
- asp.net mvc3开发系统点滴之三
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之调整首页显示
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之登录窗口调试
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之完成登录功能
- asp.net mvc+jquery easyui开发实战教程之网站后台管理系统开发1-准备工作
- Asp.net MVC 3 开发一个简单的企业网站系统
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之登录窗口调试
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之调整首页显示
- Asp.net Mvc开发体会点滴 一
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之登录窗口调试
- asp.net mvc+jquery easyui开发实战教程之网站后台管理系统开发3-登录模块开发
- Asp.net MVC 3 开发简单的企业系统开篇--数据库
- ASP.NET MVC Linq 技术 企业级通用OA系统 全程开发
- asp.net mvc+jquery easyui开发实战教程之网站后台管理系统开发4- 后台模板html页面创建
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之登录窗口调试
- Asp.net MVC 3 开发企业网站系统仿照博客园部分功能--总体设计
- Asp.net MVC 3 开发一个简单的企业网站系统
- Asp.net MVC 3 开发一个简单的企业网站系统
- 基于ASP.NET MVC+Linq等技术下的企业级通用OA系统全程开发