Click here to Skip to main content
15,917,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I want to dispaly image in asp .net gridview. But i am storing images from first webpage.
i am storing the images in sql server 2008, my data base filed is image and image dbtype is image.i want to retrieving images form database and show it an other web page in asp.net gridview.

ASP.NET
this a my first web page selected files are storing into datasase.
<form id ="form1"  runat="server">
<table>
<tr align="left">
                        <td>
                            Student PIN
                        </td>
                        <td>
                            :
                        </td>
                        <td>
                            <asp:TextBox ID="txtStudentPIN" runat="server" MaxLength="16" ToolTip="Student PIN Number Provided by State Board Of Technical Education And Training"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtStudentPIN"
                                Display="Dynamic">Enter Student PIN</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr align="left">
                        <td>
                            Certificate1
                        </td>
                        <td>
                            :
                        </td>
                        <td>
                            <asp:FileUpload ID="FileUpload1" runat="server" Style="margin-bottom: 0px" ToolTip="Upload certificate 1" />
                        </td>
                        <td>
                             
                        </td>
                    </tr>
                    <tr align="left">
                        <td>
                            Certificate 2
                        </td>
                        <td>
                            :
                        </td>
                        <td>
                            <asp:FileUpload ID="FileUpload2" runat="server" ToolTip="Upload Certificate 2" />
                        </td>
                        <td>
                             
                        </td>
                    </tr>
                    <tr align="left">
                        <td>
                            Certificate 3
                        </td>
                        <td>
                            :
                        </td>
                        <td>
                            <asp:FileUpload ID="FileUpload3" runat="server" ToolTip="Upload Certificate 3" />
                        </td>
                        <td>
                             
                        </td>
                    </tr>
                    <tr align="left">
                        <td>
                            Certificate 4
                        </td>
                        <td>
                            :
                        </td>
                        <td>
                            <asp:FileUpload ID="FileUpload4" runat="server" ToolTip="Upload Certificate 4" />
                        </td>
                        <td>
                             
                        </td>
                    </tr>
                    <tr align="left">
                        <td>
                            Certificate 5
                        </td>
                        <td>
                            :
                        </td>
                        <td>
                            <asp:FileUpload ID="FileUpload5" runat="server" ToolTip="Upload Certificate 5" />
                        </td>
                        <td>
                             
                        </td>
                    </tr>
                     
                      <tr>
                        <td align="left">
                            <asp:Button ID="btnApply" runat="server" Text="Apply" CssClass="BtnGreen" OnClick="btnApply_Click" />
                        </td>
                    </tr>
</table>
</form>>

And i want to display images in second webpage in gridview
This is form2 
<form id='form2'  runat="server">
<table>
<tr>
<td>
<asp:GridView ID="GVImages" runat="server" AutoGenerateColumns="true" AutoGenerateSelectButton="true"
</asp:GridView>
</td>
</tr>
</table>
</form>
Posted
Updated 26-Oct-13 2:21am
v8
Comments
Tom Marvolo Riddle 26-Oct-13 7:57am    
Try it.It is not as difficult as you think.

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