Click here to Skip to main content
Rate this: bad
good
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)
{
try
{
conn.Open();
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);
}
}
}
catch
{
conn.Close();
}
}
 
private string ToString(string p)
{
throw new NotImplementedException();
}
}
Posted 4-Feb-13 1:09am
akkasam302

1 solution

Rate this: bad
good
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()
  Permalink  

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

  Print Answers RSS
0 Maciej Los 350
1 OriginalGriff 283
2 Nguyen.H.H.Dang 230
3 Sergey Alexandrovich Kryukov 230
4 Peter Leow 195


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