please check this(its urgent)
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;
}