how to bind data and image with gridview using c#

Posted by Ramakrishna188 under ASP.NET on 4/2/2012 | Points: 10 | Views : 26204 | Status : [Member] | Replies : 3
hi all

please send me any one. my requirement is i want to display data and image in gridview . i have 6 columns and 1 columns is image column.
and edit update and delete the rows in gridview in using c#


thank you.




Responses

Posted by: Patel28rajendra on: 4/3/2012 [Member] Starter | Points: 25

Up
0
Down
hI

Visit this link its very interesting

http://www.dotnetfunda.com/articles/article1084-saving-images-into-the-database-in-aspnet-and-displaying-to-the-gridview-.aspx

Thanks

R D Patel

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

Posted by: CS1401 on: 4/3/2012 [Member] Starter | Points: 25

Up
0
Down
You first create handler and pick the image from database in binary format,

 <column>

<asp:TemplateField HeaderText="Photo">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%# "~/Handlers/showempImage.ashx?autoid="+Eval("autoid")%>'
BorderWidth="2px" Height="80px" Width="80px" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Employee ID" DataField="empid" />
</column>


...

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

Login to post response