Click here to Skip to main content
15,909,645 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
See more:
I have given image buttons for the command Update,Delete,edit,add new record..
C#
<asp:TemplateField>
<EditItemTemplate>
<asp:ImageButton ID="imgbtnUpdate" CommandName="Update" runat="server" ImageUrl="~/App_Data/images/update.jpeg" ToolTip="Update" Height="20px" Width="20px" />
<asp:ImageButton ID="imgbtnCancel" runat="server" CommandName="Cancel" ImageUrl="~/App_Data/images/cancel.jpeg" ToolTip="Cancel" Height="20px" Width="20px" />
</EditItemTemplate>
<ItemTemplate>
    
<asp:ImageButton ID="imgbtnEdit" CommandName="Edit" runat="server" ImageUrl="~/App_Data/images/edit.jpeg" ToolTip="Edit" Height="20px" Width="20px" />
<asp:ImageButton ID="imgbtnDelete" CommandName="Delete" Text="Edit" runat="server" ImageUrl="~/App_Data/images/delete.jpeg" ToolTip="Delete" Height="20px" Width="20px" />
</ItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="imgbtnAdd" runat="server" ImageUrl="~/App_Data/images/addnewitem.jpeg"  CommandName="AddNew" Width="30px" Height="30px" ToolTip="Add new User"/>
</FooterTemplate>
</asp:TemplateField>

but at the run time the image buttons are not being displayed,instead a label Submit Query is being displayed....???????
Posted
Updated 5-Oct-17 1:57am
Comments
pree_kh 9-Aug-12 7:11am    
thxxxxxx Prabhakaran..:)
Volynsky Alex 10-Aug-12 5:19am    
Please see here:
http://forums.asp.net/t/1110689.aspx/1

The App_Data folder is a special folder reserved for data such as database files and so on, and will NOT render out any contents on the web. This is by design, and intentional and cannot be changed.

Your images do definitely not belong into the App_Data subfolder - put them into a /images folder or something more appropriate.
 
Share this answer
 
Comments
Volynsky Alex 9-Aug-12 11:47am    
+5!
Hi,
Move your images from App_Data folder to different directory(like Images). App_Data folder is used for database classes and files(like: mdf).


--Amit
 
Share this answer
 
Comments
Volynsky Alex 9-Aug-12 11:47am    
+5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900