this code for aspx.cs:
text file contains:
string con = new SqlConnection(C onfigurationMan ager.Connection Strings["nandhaconnecti onstring"].ConnectionStri ng);
i get error The ConnectionStrin g property has not been initialized.
Code:
string inputString;
resultLabel.Text = "";
using (StreamReader streamReader = File.OpenText(@"E:\projects\readtxt\nan.txt"))
{
inputString = streamReader.ReadLine();
while (inputString != null)
{
resultLabel.Text += inputString + "<br />";
inputString = streamReader.ReadLine();
}
}
string con = new SqlConnection(C onfigurationMan ager.Connection Strings["nandhaconnecti onstring"].ConnectionStri ng);
i get error The ConnectionStrin g property has not been initialized.
Comment