Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 790
  • Last Modified:

refresh gridview in IFrame

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
BradleyCleveland
Asked:
BradleyCleveland
  • 2
1 Solution
 
dj_alikCommented:
i think it would be better move to main page all your controls
iFrames have been getting a bad reputation...
0
 
dj_alikCommented:
read some thoughts
Are IFrames (HTML) obsolete?
http://stackoverflow.com/questions/755795/are-iframes-html-obsolete
0
 
Miguel OzSoftware EngineerCommented:
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
 
BradleyClevelandAuthor Commented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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