• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 776
  • Last Modified:

How to load gridview in page without postback

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.
1 Solution
thamilto0410Author Commented:
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?
Question PAQ'd and stored in the solution database.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now