Hello
actually...i am trying to create a hyperlink of a text file retrieving the file from the database.....
after creating a hyperlink i have to navigate to the blank page to see the text document....
i have tried...but i am a fresher and beginner to c#
CODE
SqlCommand cmd = new SqlCommand("GetCount", con);
SqlCommand cmd1 = new SqlCommand("Getlocation", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd1.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Description", dr[0].ToString());
cmd1.Parameters.AddWithValue("@Description", dr[0].ToString());
DataSet ds = new DataSet();
DataSet ds1 = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter(cmd1);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da1.Fill(ds1);
da.Fill(ds);
string strd = ds1.Tables[0].Rows[0][0].ToString();
string strv = ds.Tables[0].Rows[0][0].ToString();
strPath = strd;
int count = int.Parse(strv);
countf = countf + count;
Literal lit = new Literal();
lit.Text = dr[0].ToString() + "<br>";
Panel1.Controls.Add(lit);
HyperLink hpk = new HyperLink();
hpk.Text = strPath + ".txt";
hpk.NavigateUrl = "file:///"+strPath + ".txt";
//lit1.Text = "<asp:HyperLink Text = " + strPath + " ></asp:HyperLink>";
Panel1.Controls.Add(hpk);
i tried but....the link appears but it doesnot link to other page or doesnot show up anything....i need help