Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a method to get all courses from database. using System.Data; using System.Configuration; using System.Data.SqlClient; protected void Page_Load(object sender, EventArgs e) { gvCourses.DataSource = GetCourses();
Write a method to get all courses from database.
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
protected void Page_Load(object sender, EventArgs e)
{
gvCourses.DataSource = GetCourses();
gvCourses.DataBind();
}
private DataTable GetCourses()
{
.....................
.....................
.....................
return dtCourse;
}
Output: Course Name Location CSE5041 Database Design and Development AK3B0810 MCB1007 Intr. to Probability and Statistics AK01 CSE5001 Web Programming AK5C0810 CSE5031 Operating Systems AK2B16 CSE7093 Engineering Economics AK4B0810 CSE0463 Software Quality & Testing AK4C0406Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started