hi friends,
am working on asp.net c#, Sqlserver 2005.
I have webform to add user records and attach the files, whatever i have attached it will add in folder(sol explorer) after attaching i will retrieve it and display in gridveiw.
I have a pdf attachments in gridview,
I have added a attachment image in template field, this image will show for all the rows of gridveiw.
This is my attachment.
<asp:TemplateField>
<HeaderStyle Width="20px" />
<ItemStyle Width="20px" />
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" Text='<%# Bind("Attachment") %>' NavigateUrl='<%# Bind("Attachment", "AttachmentsTIP_Folder/{0}") %>' runat="server" ToolTip="View Attachment"
ImageUrl="~/User/ImagesUser/AttachmentIMG.png" />
</ItemTemplate>
</asp:TemplateField>
Suppose, if a pdf is not attached, if i click in gridview attachment image, it must display a message, "Sorry No attachment for this record"
can you please help me , how to do this ???
Thanks in advance.