ASP UserInfoList 方法1
<%@ 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的更多相关文章
- Asp UserInfoList 方法二
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserInfoList.a ...
- Win7、win2008中让IIS7支持asp的方法
Win7或Windows server 2008中IIS7支持ASP+Access解决方法. 1. 让IIS7支持ASP Win7或Windows server 2008中IIS7是默认不安装的, ...
- ASP数据库连接方法语法总结
经常使用到有关数据库的操作.包括连接代码,SQL命令等等,又不曾刻意去记忆它们(我本人是不愿意去记这东东),所以常常在用到的时候又去查书本,翻来翻去.一些比较少用的数据库还不一定能顺利找到,所以现在把 ...
- asp.net--OnAuthorization方法
我看别人可以通过这个方法中的 Context.Request.Headers.Authorization对象来调取对象来使用,可是我通过实验尝试不出来,真不知道为什么,这儿留个坑吧 别人的 我的
- asp.Net2.0中TextBox设置只读后后台获取不到值的解决方法
http://www.cnblogs.com/yxyht/archive/2013/03/02/2939883.html ASP.NET中TextBox控件设置ReadOnly="tru ...
- 用ASP.Net(C#)连接Oracle数据库的方法及实例
今天看了一下asp.net连接oracle数据库的方法,得到了如下代码.这段代码打开了MyTable表,并把操作员的名字列出.字段类型是OracleString.读取的时候用的是字段编号,我不知道怎么 ...
- [转载]ASP.NET中TextBox控件设立ReadOnly="true"后台取不到值
原文地址:http://www.cnblogs.com/yxyht/archive/2013/03/02/2939883.html ASP.NET中TextBox控件设置ReadOnly=" ...
- ASP.NET MVC3入门教程之第一个WEB应用程序
本文转载自:http://www.youarebug.com/forum.php?mod=viewthread&tid=91&extra=page%3D1 上一节,我们已经搭建好了AS ...
- [转]支付宝接口程序、文档及解读(ASP.NET)
本文转自:http://www.cnblogs.com/blodfox777/archive/2009/11/03/1595223.html 最近需要为网站加入支付宝的充值接口,而目前关于支付宝接口开 ...
随机推荐
- adobe-flash-player离线下载方法
https://www.neowin.net/news/adobe-flash-player-3000134 http://fpdownload.adobe.com/get/flashplayer/p ...
- MouseGestureLahk
http://cyber-furoshiki.com/win-mouse-gesture-l http://www.vector.co.jp/download/file/winnt/util/fh68 ...
- Multi-Tenancy模式,基础服务大规模扩张的时候,是应该推进了。
这不是技术介绍.这是我要推进的工作,记在这里.服务的对象太多,必须隔离为不同租户了.
- [Angular] Angular CLI
Create an app with routing config: ng new mynewapp --routing If you want to generate a new module wi ...
- [Ramda] Get a List of Unique Values From Nested Arrays with Ramda (flatMap --> Chain)
In this lesson, we'll grab arrays of values from other arrays, resulting in a nested array. From the ...
- 小强的HTML5移动开发之路(32)—— JavaScript回顾7
BOM模型brower object model(浏览器对象模型),通过浏览器内置的一些对象可以操作浏览器本身. DOM是用来操作页面的,BOM是用来操作浏览器本身的. BOM是没有规范的,但是大部分 ...
- python io操作
一次性读取 # 读取文件 # 默认打开文件的方式是只读 file = None try: file = open("f:/test.sql") print(file.name) # ...
- ssh远程连接docker中的 linux container
ssh远程连接docker中的container 由于工作需要,要远程连接Container,本地机器是windows,以下为解决步骤: 1. 环境 本地:Windows ↓ Docker版本1. ...
- pycharm输出乱码如\xe9\x9d\x92\xe8\x9b\x99\xe7\x8e\x8b\xe5\xad\x90转成中文
转自:https://blog.csdn.net/baidu_19473529/article/details/54949453 利用Python解决unicode编码问题,有些json在控制台打印也 ...
- GridLayout网格布局
网格布局特点: l 使容器中的各组件呈M行×N列的网格状分布. l 网格每列宽度相同,等于容器的宽度除以网格的列数. l 网格每行高度相同,等于容器的高度除以网格的行数. l 各组件的排列方式 ...