Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
no overload for method takes '1' arguments
Santosh Kumar
Oct 24 2013 12:51 PM
5.6k
Reply
Hi all!
I have a problem, I am using this code in a software and I am getting a error in GetData(cmd).
I have done it another way but I want to know what's really problem, can anybody help me?
string dbconnection = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;
private void BindData()
{
SqlConnection con = new SqlConnection(dbconnection);
string strQuery = "select CustomerID,ContactName,CompanyName " + " from customers";
SqlCommand cmd = new SqlCommand(strQuery);
GridView1.DataSource = GetData(cmd);
// => getting eror (no overload for method 'GetData' takes '1' arguments)
GridView1.DataBind();
}
private void GetData()
{
GridView1.DataBind();
}
Thanks
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
can i use only html in View (mvc 4)?
asp.net with mvc4