Solved

refresh gridview in IFrame

Posted on 2011-09-03
4
779 Views
Last Modified: 2012-05-12
Just for the record, I'm new to asp.net, so be specific.
I have a main page with an Iframe on it. On the IFrame page I have a gridview that is based on an sql query command.  On the main page, I have a listbox with dates in it. What I need to happen is when the user selects a date from the listbox, the date value is sent as a parameter to the gridview on the IFrame so that the sql statement for the gridview is now based on the new date. If it would be better to move the Gridview to the main page, i don't have a problem with that as long as all my other controls on the page don't get refreshed.
0
Comment
Question by:BradleyCleveland
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
dj_alik earned 500 total points
ID: 36480355
i think it would be better move to main page all your controls
iFrames have been getting a bad reputation...
0
 
LVL 18

Expert Comment

by:dj_alik
ID: 36480361
read some thoughts
Are IFrames (HTML) obsolete?
http://stackoverflow.com/questions/755795/are-iframes-html-obsolete
0
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 36480386
You can use an Ajax update panel (instead of the iframe) to contain the gridview that is triggered by the list box.

For update panel check:
http://www.4guysfromrolla.com/articles/102407-1.aspx
http://www.dotnetfunda.com/tutorials/ajax/updatepanel.aspx
http://www.asp.net/ajax/tutorials/understanding-partial-page-updates-with-asp-net-ajax
0
 
LVL 1

Author Closing Comment

by:BradleyCleveland
ID: 36482147
I was able to get the gridview back on the main page and refresh the data. I thought that it would affect the other controls when I refreshed it, but it didn't so I'm happy that I don't even have to deal with iFrames for now.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question