Click here to Skip to main content
11,576,963 members (54,966 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
I have a page which contains some panels,each panel contains a image and a label with the description of the image. I am trying to display a modal popup when user clicks on any part of the panel. In the modal popup some other details will be displayed but the image will be there.Images will be taken from database.I need to fetch the image id from the panel and need to supply it to the modal popup panel. But the problem is panel does not contain a server side click event. I don't want to post back the entire page on click on the panel. Any suggestion ? Thanks in advance.
Posted 6-Jan-13 6:33am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There are no server side click events. There's a click event on the client which creates a postback.

The best answer for AJAX is always to use jquery, and avoid the MS AJAX library. The MS library always does a full postback, even if it's not clear to you that it does.
Boy in the Box at 8-Jan-13 12:22pm
thanks for your answer .. I was just thinking that I can do a post back using javascript and save the id of the image in that panel in a session variable then i can set the url of the of the image in pop up using the value of the session variable.But for this I need a full post back . Please suggest me a way so that I can avoid full post back .
Christian Graus at 8-Jan-13 14:05pm
You can store session values in an AJAX call. You use jquery to do real AJAX, not the MS library
Boy in the Box at 27-Jan-13 2:18am
can u please help with code snippet

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

  Print Answers RSS
0 DamithSL 155
1 OriginalGriff 115
2 Afzaal Ahmad Zeeshan 95
3 Abhinav S 90
4 Lucifier Rocks 85
0 OriginalGriff 820
1 Sergey Alexandrovich Kryukov 631
2 Abhinav S 528
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 365

Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 6 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100