Link to home
Start Free TrialLog in
Avatar of thamilto0410
thamilto0410

asked on

How to load gridview in page without postback

Hello,
I have a page with many panels that have divs and quite a few calls to the database.  This is what I need to do but don't know how to go about it.  On the click of a button I am using javascript to do some validation and then I need to populate a gridview in a hidden div with a call to the database and passing a querystring that is the sql.  All this without full postback as I don't want all the elements above the grid to clear.  I thought about xmlhttprequest and ajax and the updatepanel but I haven't seen a good enough example that could be modified to suit what I need.  My site has master and content with one usercontrol.   Can someone show me a working example or just send me some links of  good examples that load a grid in the same page as I already have.   Thanks.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of thamilto0410
thamilto0410

ASKER

codecruiser:  I am really new to ajax.  I have looked at many samples but don't understand enough yet to modify any of them so I decided to use the updatepanel.  It works and the grid and div load and the rest of the page does not post back but a second after it loads the updatepanel disappears.  I have a trigger set with asynpostback and id as the button and I have the script manager in a usercontrol that sits in this page and I have partialpagerendering set to true.  I also have if not page.ispostback on the page load in codebehind but I am still doing something wrong.  Can you tell me how to troubleshoot this?
ASKER CERTIFIED SOLUTION
Avatar of ee_auto
ee_auto

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial