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
Kamala Veni
NA
65
21.3k
Display Rows as Columns in Gridview in Asp.net using C#, VB.
Apr 15 2016 3:15 AM
Hi
Am having a saved data's in the sql table and wanna display dat columns as rows and rows as a column in the output gridview pls help me...
this is for normal view,bt i need for another change
protected void Page_Load(object sender, EventArgs e)
{
string un = Session["Uname"].ToString();
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["App"].ToString());
DataTable dt = new DataTable();
SqlCommand sqlCommand = new SqlCommand("select TOP 30 * from tbl_sch1 where [USER NAME]='" + un + "'", con);
con.Open();
SqlDataReader reader = sqlCommand.ExecuteReader();
GridView1.DataSource = reader;
GridView1.DataBind();
}
Reply
Answers (
1
)
How to convert numeric string value to int number
How to create a Wizard?