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
Mark John Castro
NA
3
788
How to retrive data from mysql database (xampp)
Mar 4 2018 11:19 AM
Im trying to retrieve data from Mysql database using Gridview or html table
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGridviewData();
}
}
public void BindGridviewData()
{
using (MySqlCommand cmd = new MySqlCommand("select * from login", con))
{
con.Open();
DataSet ds = new DataSet();
using (MySqlDataAdapter da = new MySqlDataAdapter(cmd))
{
da.Fill(ds);
gvDetails.DataSource = ds;
gvDetails.DataBind();
}
}
}
Thanks in advance :)
Reply
Answers (
1
)
I need help to Track mail
Got Error when Publish project to BitBucket from VS2013