温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:SqlHelper源码及使用实例
当前文件:
SqlHelper/ExcuteReader.aspx,打开代码结构图
SqlHelper/ExcuteReader.aspx,打开代码结构图1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ExcuteReader.aspx.cs" Inherits="ExcuteReader" %> 2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4
5
<html xmlns="http://www.w3.org/1999/xhtml" > 6
<head runat="server"> 7
<title>51aspx.com</title> 8
</head> 9
<body> 10
<form id="form1" runat="server"> 11
<div> 12
</div> 13
<table style="width: 411px"> 14
<tr> 15
<td> 16
执行的语句:</td> 17
</tr> 18
<tr> 19
<td> 20
<asp:TextBox ID="txtsql" runat="server" Width="263px" Text="select * from myTable"></asp:TextBox></td> 21
</tr> 22
<tr> 23
<td> 24
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="执行" Width="96px" /></td> 25
</tr> 26
<tr> 27
<td> 28
执行结果:</td> 29
</tr> 30
<tr> 31
<td> 32
<asp:DataList ID="DataList1" runat="server" Width="400px"> 33
<ItemTemplate> 34
编号:<%# Eval("id") %> | 姓名:<%# Eval("name") %> 时间:<%# Eval("pdate") %><br/> 35
</ItemTemplate> 36
</asp:DataList></td> 37
</tr> 38
</table> 39
<a href="http://www.51aspx.com" target="_blank">download from 51aspx.com</a> 40
41
</form> 42
</body> 43
</html> 44



