Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
nspace.cs
Package: Visual.rar [view]
Upload User: yiyuerguo
Upload Date: 2014-09-27
Package Size: 3781k
Code Size: 1k
Category:
CSharp
Development Platform:
Others
- using System;
- using System.Data;
- using System.Data.OleDb;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- namespace nspace
- {
- public class MyCodeBehind : Page
- {
- public DataGrid MyList;
- public DataGrid MyListb;
- private void Page_Load(Object sender, EventArgs e)
- {
- if(!IsPostBack)
- {
- OleDbConnection myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+ Server.MapPath("candsql.mdb"));
- OleDbDataAdapter myCommand = new OleDbDataAdapter("select aa.* FROM aa WHERE typeid=1 order by shijian desc", myConnection);
- //OleDbDataAdapter myCommand = new OleDbDataAdapter("select top 7 aa.* FROM aa WHERE typeid=1 order by shijian desc", myConnection);
- OleDbDataAdapter myCommandb = new OleDbDataAdapter("select bb.* FROM bb ", myConnection);
- DataSet ds = new DataSet();
- DataSet dsb = new DataSet();
- myCommand.Fill(ds, "aa");
- myCommandb.Fill(dsb, "bb");
- MyList.DataSource = ds.Tables["aa"].DefaultView;
- MyListb.DataSource = dsb.Tables["bb"].DefaultView;
- MyList.DataBind();
- MyListb.DataBind();
- }
- }
- protected string FormatString(string str)
- {
- str=str.Replace(" "," ");
- str=str.Replace("<","<");
- str=str.Replace(">",">");
- str=str.Replace('n'.ToString(),"<br>");
- return str;
- }
- }
- }