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
hindu duvasi
NA
5
0
please check this(its urgent)
Aug 26 2008 7:16 AM
Hii, in my table I have fields like id1,title,description,category,posteddate..In my gridview I wish to display title,posteddate and category. I placed a hyperlink for title field. Now when I click on title it should display the description part which I have entered before. My problem is when I bind the description part to gridview its binding all the data which is present under description but I want only the description part which is entered by that particular user..
Do I need to do anything with id1 in the query part..Pls let me know
Here is my code:
===================
SqlConnection sqlCn = new SqlConnection("User ID=sa;Initial Catalog=harini;Data Source=SYS05");
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
ds = getdataset();
GridView1.DataSource = ds;
GridView1.DataBind();
}
public DataSet getdataset()
{
string query = ("SELECT title, category, posteddate FROM tblAdd");
SqlDataAdapter mydap = new SqlDataAdapter(query, sqlCn);
DataSet ds = new DataSet();
mydap.Fill(ds);
return ds;
}
Reply
Answers (
1
)
Image Download from Website
which features are added in asp.net 3.5