zoukankan      html  css  js  c++  java
  • asp.net mvc3开发系统点滴之二

    <%@ 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=" 150px">
                        景点名称
                    </th>
                    <th style=" 150px">
                        景点编号
                    </th>
                    <th style=" 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();
            }
        }
    }

  • 相关阅读:
    简单的本地注册与登陆的功能
    Android 简单统计文本文件的字符数、单词数、行数、语句数Demo
    个人项目需求与分析——点菜系统App
    强大的健身软件——Keep
    大学生三大痛点
    我推荐的一款实用APP-圣才电子书
    PropertyDescriptor和BeanUtils使用去获得类的get 和 setter访问器
    神奇的 Object.defineProperty
    用cudamat做矩阵运算的GPU加速
    Java并发编程概要
  • 原文地址:https://www.cnblogs.com/fx2008/p/2147301.html
Copyright © 2011-2022 走看看