Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Invalid attempt to read when no data is present in ASP.NET
selva kumar
Feb 4 2015 2:42 AM
788
Reply
I am using C# to learn ASP.NET, I tried to write authentication code as
but i am always got these error plz give some solution..
protected void Button3_Click(object sender, EventArgs e)
{
Button3.Visible = true;
txtdms.Visible = true;
lbldms.Visible = true;
str3 = "Select [Coloum Name1],[Coloum Name2] from LPsupplier where [DMS Vendor Code] = '" + txtbox.Text + "'";
sqlCmd.Connection = conn;
sqlCmd.Connection.Open();
sqlCmd.CommandText = str3;
sqlDr = sqlCmd.ExecuteReader();
sqlDr.Read();
txtaxcode.Text = sqlDr["Coloum Name1"].ToString();
txtvendorname.Text = sqlDr["Coloum Name2"].ToString();
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Instead of Grid View can we use table???
How to use ng-grid in ASP.NET Page