TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Santosh Kumar
NA
561
2.6m
no overload for method takes '1' arguments
Oct 24 2013 12:51 PM
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
Reply
Answers (
2
)
Data Owner MVC4
asp.net with mvc4