zoukankan      html  css  js  c++  java
  • 基本

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data.OleDb;
    using System.Data;
    using System.Configuration;
    
    public partial class _Default : System.Web.UI.Page
    {
        string connstr = ConfigurationManager.AppSettings["connstr"];
        string sql = "select * from admin";
      
        protected void Page_Load(object sender, EventArgs e)
        {
            string strConnection = "PRovider=Microsoft.Jet.OleDb.4.0;Data Source=";
            strConnection += Server.MapPath("database.mdb");
            OleDbConnection objConnection = new OleDbConnection(strConnection);
            OleDbCommand objCommand = new OleDbCommand("select * from admin", objConnection);
            objConnection.Open();
            OleDbDataReader objDataReader = objCommand.ExecuteReader();
            if (objDataReader.Read())
            {
                
               TextBox1.Text = Convert.ToString(objDataReader["user"]);
             
           
            }
            
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string ip = Request.UserHostAddress; 
           
        }
    }
    

      

  • 相关阅读:
    hiho150周
    hdu1011
    hiho1055/hdu1561
    bat脚本启动exe并打开文件后退出 + 中文乱码
    hiho1080
    hiho1079
    java异常处理——基础篇
    找不到要编译的文件——path环境变量配置
    MVC——studying
    轻松搞定EasyUI
  • 原文地址:https://www.cnblogs.com/cnmx/p/3680033.html
Copyright © 2011-2022 走看看