Click here to Skip to main content
Sign Up to vote bad
good
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:09
akkasam302


1 solution

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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 8,123
1 OriginalGriff 6,040
2 CPallini 3,432
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid