click each colum of gridview(VB.NET) to see the picture from SQL database RRS feed

  • Question

  • User-1578974752 posted

    I have uploaded images  in to database image table using studentnew.aspx .it stores the path.

    Image tabele in sql db is as below


    Img1...Img5 have the path as C:\Users\Administrator\Pictures\Screenshots\Screenshot (3).png

    1 student ID will have  4 or 5 images.so it is showing in gridview as 1 line when i select with studentID as below

    Now I want to click each screenshots.png and view that image in another webpage(studentretrive.aspx).How can I do his..Thanks


    img1               img2    img3  img4    img5
    screenshot(5).png  screenshot(6).png  screenshot(7).png  screenshot(17).png  screenshot(27).png 
    Friday, July 6, 2018 3:55 AM


All replies

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 6, 2018 5:42 AM
  • User-1578974752 posted

    Thanks for the reply. Opening in another page is not working. I can upload and view in the same .aspx form. I want to show in studentretrive.aspx ,once the user click Retrive Button.. with all other value I need this images to be shown. Once click, must open the image. there won't be file upload in the studentretrive page.

    Friday, July 6, 2018 10:33 AM
  • User1992938117 posted

    What is the issue here, just pass the identity (query string) to next page and load image as yo are doing now in the new page.

    Friday, July 6, 2018 11:13 AM
  • User-1578974752 posted

    In the retrival form already studentid is passing through the query string ,and based on the value of student ID all values are retrieved. File upload is happening on the New form creation time.  The user will recive an email notification and when the link in email when click(Have the query string with student ID), it will redirect to retrieval form with all details. At this time I want to show the uploaded value of file upload. How can I pass two ID(Student ID and FILE UPLOAD ID) through 1 query string.In the Image table I have one more column for student ID.

    Monday, July 9, 2018 1:39 AM
  • User36583972 posted

    Hi shsu,

    How can I pass two ID(Student ID and FILE UPLOAD ID) through 1 query string.In the Image table I have one more column for student ID.

    You can refer the following links.

    How to: Pass Values Between ASP.NET Web Forms Pages

    How to pass multiple parameters in a querystring

    Best Regards,

    Yong Lu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 9, 2018 3:05 AM
  • User-1578974752 posted

    Thanks for the answers. I have pdf and print screens as attachments. So after clicking the image ,the zoom function is working but the page is not readable.( When I change the height and width only the window size is increasing the image size not changing). In grid view it must show as small image but when clicked must  zoom to normal A4 size and how can I incorporate save option in this so that users can save.  

    <asp:GridView ID="gvImages" runat="server" AutoGenerateColumns="False" Height="84px" Width="176px">


    <asp:BoundField DataField="FileId" HeaderText="Image Id" Visible="False" />

    <asp:BoundField DataField="Name" HeaderText="Name" Visible="False" />

    <asp:ImageField DataImageUrlField="Path" HeaderText="Image" >

    <ControlStyle Height="30px" Width="30px" />




    <div id="dialog" style="display: none">


    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/themes/start/jquery-ui.css" />

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js"></script>

    <script type="text/javascript">

    $(function () {


    autoOpen: false,

    modal: true,

    height: 600,

    width: 600,

    title: "Zoomed Image"


    $("[id*=gvImages] img").click(function () {







     Another problem is that ,There are lot of text boxes and dropdownlist which user have to type before the file upload.But After file upload all the values in the text boxes become blank and have to retype again.If I didn't use


    Text box values are not becoming empty but the grid view is not showing after uploading.


    Tuesday, July 10, 2018 3:04 AM