Click here to Skip to main content
12,817,428 members (38,047 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
using System;
using System.Configuration;
using System.Data;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/abby1/My Documents/Visual Studio 2008/WebSites/WebSite3/App_Data/TEST.mdb");
OleDbDataReader rdr = null;
protected void Page_Load(object sender, EventArgs e)

protected void TextBox1_TextChanged(object sender, EventArgs e)

protected void Button1_Click(object sender, EventArgs e)
OleDbCommand str = new OleDbCommand("select appno from final", conn);
OleDbDataReader rdr = str.ExecuteReader();
DataSet ds = new DataSet();
if (rdr.HasRows)
while (rdr.Read())

TextBox1.Text = Convert.ToString(str);

private string ToString(string p)
throw new NotImplementedException();
Posted 4-Feb-13 2:09am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try the following code & mark it answer if it helps .

TextBox1.Text = rdr("appno").ToString()

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100