Rating an image in grid view

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saurabh9gupta
    New Member
    • Aug 2009
    • 52

    Rating an image in grid view

    Hello All,

    I ve made a webpage in which I am displaying images in a grid.(the logic is that i have stored the path in the database and using EvalPath i m displaying the image.)

    Now i have also added a Javascript code which generates a lightbox kinda effect.

    The problem is that I want to take the Id of the image so that when the user tries to RATE any image on the site, a code executes backend that stores the rating.

    How do I acheive this without a postback.???
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Well, if you want to store the rating you have to post back to the server.

    There is no way to record anything client side only...well you could but as soon as the user closes the browser the rating will disappear. Which is useless to you.

    So you Have to post back to the server.

    What you don't have to do is post the Whole page back to the server.
    You could place the GridView into an UpdatePanel so that only that section of the page is refreshed when the request returns. It's call Asynchronous postback...and it involves using Ajax (but the UpdatePanel takes care of all of that for you).

    -Frinny

    Comment

    Working...