how to runtime any visible in linkbutton or hide?

Posted by Chandru_ra under Regular Expressions on 7/20/2011 | Points: 10 | Views : 1930 | Status : [Member] | Replies : 1
Dear all,

am using two type of uploading one file uploadcontrol(linkbutton download for upload files) another one href link in post both are saved in database. but one time upload for any one file only. another file hide how..
am code:
if (fileVideofile.HasFile)
{
//Save File to the proper directory
string filename = Path.GetFileName(fileVideofile.FileName);
fileVideofile.SaveAs(Server.MapPath("UploadFiles/") + filename);
Videofile = "UploadFiles/" + fileVideofile.FileName;
es/") + fileVideofile.FileName);

}
else
{
Videofile = "empty.wav";
fileVideofile.SaveAs(Server.MapPath("UploadFiles/") + Videofile);
cmd.Parameters.AddWithValue("@Uploadimages",Videofile);
cmd.Parameters.AddWithValue("@Url", txtUrl.Text);
<asp:GridView ID="GridVideofile" runat="server" AutoGenerateColumns="false" Width="647px"
CssClass="GV" onrowdatabound="GridVideofile_RowDataBound"
ShowHeader="False">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<tr>
<td>
Download Video File :
<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" Visible="True">Download File</asp:LinkButton>

</td>
</tr>
<tr>
<td>
Url Video File :
<a href='<%#Eval("Url")%>' target="_blank"><%#Eval("Url")%></a>
</td>
</tr>
</ItemTemplate>
</asp:TemplateField>

</Columns>
if (e.Row.RowType == DataControlRowType.DataRow)
{
{
LinkButton lnk = (LinkButton)e.Row.FindControl("LinkButton1");
if (!String.IsNullOrEmpty(lnk.Text))
{
lnk.Visible = true;
}
else
{
lnk.Visible = false;
}
}
}
Advance Thanks

chandru


Responses

Posted by: Gemamgall on: 6/27/2012 [Member] Starter | Points: 25

Up
0
Down
Please reframe yur question , I didn't understand what you want

Thanks and Regards,

Vinay Gandhi
www.quadtechindia.com

Chandru_ra, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response