<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserInfoList.aspx.cs" Inherits="AspExam.UserInfoList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
        <tr>
            <th>Id</th><th>UserName</th><th>UserPass</th><th>RegTime</th><th>Email</th>
        </tr>
        <%=strList %>
    </table>
    </div>
    </form>
</body>

</html>

using AspExam.BLL;
using AspExam.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AspExam
{
    public partial class UserInfoList : System.Web.UI.Page
    {
        public string strList { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            UserInfoBLL bll = new UserInfoBLL();
            List<UserInfo> list = bll.GetAllUserInfo();
            StringBuilder sb = new StringBuilder();
            foreach (UserInfo user in list)
            {
                sb.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td></tr>", user.Id, user.UserName, user.UserPass, user.RegTime, user.Email);
            }
            strList = sb.ToString();
        }
    }
}

ASP UserInfoList 方法1的更多相关文章

  1. Asp UserInfoList 方法二

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserInfoList.a ...

  2. Win7、win2008中让IIS7支持asp的方法

    Win7或Windows server 2008中IIS7支持ASP+Access解决方法.  1. 让IIS7支持ASP  Win7或Windows server 2008中IIS7是默认不安装的, ...

  3. ASP数据库连接方法语法总结

    经常使用到有关数据库的操作.包括连接代码,SQL命令等等,又不曾刻意去记忆它们(我本人是不愿意去记这东东),所以常常在用到的时候又去查书本,翻来翻去.一些比较少用的数据库还不一定能顺利找到,所以现在把 ...

  4. asp.net--OnAuthorization方法

    我看别人可以通过这个方法中的 Context.Request.Headers.Authorization对象来调取对象来使用,可是我通过实验尝试不出来,真不知道为什么,这儿留个坑吧 别人的 我的

  5. asp.Net2.0中TextBox设置只读后后台获取不到值的解决方法

    http://www.cnblogs.com/yxyht/archive/2013/03/02/2939883.html   ASP.NET中TextBox控件设置ReadOnly="tru ...

  6. 用ASP.Net(C#)连接Oracle数据库的方法及实例

    今天看了一下asp.net连接oracle数据库的方法,得到了如下代码.这段代码打开了MyTable表,并把操作员的名字列出.字段类型是OracleString.读取的时候用的是字段编号,我不知道怎么 ...

  7. [转载]ASP.NET中TextBox控件设立ReadOnly="true"后台取不到值

    原文地址:http://www.cnblogs.com/yxyht/archive/2013/03/02/2939883.html ASP.NET中TextBox控件设置ReadOnly=" ...

  8. ASP.NET MVC3入门教程之第一个WEB应用程序

    本文转载自:http://www.youarebug.com/forum.php?mod=viewthread&tid=91&extra=page%3D1 上一节,我们已经搭建好了AS ...

  9. [转]支付宝接口程序、文档及解读(ASP.NET)

    本文转自:http://www.cnblogs.com/blodfox777/archive/2009/11/03/1595223.html 最近需要为网站加入支付宝的充值接口,而目前关于支付宝接口开 ...

随机推荐

  1. 《从零開始学Swift》学习笔记(Day 1)——我的第一行Swift代码

     Swift 2.0学习笔记--我的第一行Swift代码 原创文章,欢迎转载. 转载请注明:关东升的博客 当第一次看到以下代码时我石化了.这些代码是什么东东?单词拼出来的? import Foun ...

  2. php实现二叉树遍历

    php实现二叉树遍历 一.总结 关注输入输出 二.php实现二叉树遍历 题目描述 编一个程序,读入用户输入的一串先序遍历字符串,根据此字符串建立一个二叉树(以指针方式存储). 例如如下的先序遍历字符串 ...

  3. [SCSS] Organize Styles with SCSS Nesting and the Parent Selector

    SCSS nesting can produce DRYer code by targeting child elements without having to write the parent c ...

  4. 七个帮助你处理Web页面层布局的jQuery插件

    1.UI.Layout  jQuery UI布局插件 官方网站:http://layout.jquery-dev.com/index.cfm 使用大小可折叠的嵌套面板和大量选项创建高级UI布局.布局可 ...

  5. 流媒体协议介绍(rtp/rtcp/rtsp/rtmp/mms/hls

    http://blog.csdn.net/tttyd/article/details/12032357 RTP           参考文档 RFC3550/RFC3551 Real-time Tra ...

  6. iOS 日志自动上报

       您好,欢迎使用腾讯Bugly!腾讯Bugly是腾讯公司为移动开发者开放的服务之一. 针对移动应用,腾讯Bugly提供了专业的Crash(崩溃).Android ANR(application n ...

  7. Expression Blend 的点滴(3)--Templating的妙用,制作自己的ScrollBar控件

    原文:Expression Blend 的点滴(3)--Templating的妙用,制作自己的ScrollBar控件 在Blend中,有一个功能,Make into control---通过它可以方便 ...

  8. iOS QLPreviewController(Quick Look)快速浏览jpg,PDF,world等

    #import <QuickLook/QuickLook.h> @interface ViewController ()<QLPreviewControllerDataSource, ...

  9. 进入Erlang的世界

    http://erlang.group.iteye.com/group/wiki/1407-to-enter-the-world-of-erlang 进入Erlang的世界 作为程序员,我们曾经闻听很 ...

  10. PAT 1021-1030 题解

    早期部分代码用 Java 实现.由于 PAT 虽然支持各种语言,但只有 C/C++标程来限定时间,许多题目用 Java 读入数据就已经超时,后来转投 C/C++.浏览全部代码:请戳 本文谨代表个人思路 ...