hi
I put below code in page:
using (SqlConnection conn1 = General.GetConnection())
{
using (SqlCommand _cmd1 = General.GetCommand("DownloadurlToken", conn))
{
conn1.Open();
SqlDataReader _drA = _cmd1.ExecuteReader();
while (_drA.Read())
{
HPtemporary.HRef = string.Format("http://digimaster.ir/downloads/{0}", _drA["DownloadToken"]);
HPtemporary.InnerText = Page.ResolveClientUrl(HPtemporary.HRef);
}
}
}
and:
<a ID="HPtemporary" runat="server"></a>
now I want use <a> tag in grid view:
<asp:TemplateField ItemStyle-Width="24px" ItemStyle-VerticalAlign="Middle">
<ItemTemplate>
<a ID="HPtemporary" runat="server" ></a>
</ItemTemplate>
</asp:TemplateField>
and:
if (_drA.HasRows)
{
GridView1.DataSource = _drA;
GridView1.DataBind();
}
but how I can use below code in gridview:
HPtemporary.HRef = string.Format("http://mysite.com/downloads/{0}", _drA["DownloadToken"]);
HPtemporary.InnerText = Page.ResolveClientUrl(HPtemporary.HRef);
Best Regards
Neda