Link to home
Start Free TrialLog in
Avatar of BradleyCleveland
BradleyCleveland

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of dj_alik
dj_alik

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
Avatar of dj_alik
dj_alik

read some thoughts
Are IFrames (HTML) obsolete?
http://stackoverflow.com/questions/755795/are-iframes-html-obsolete
Avatar of Miguel Oz
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
Avatar of BradleyCleveland

ASKER

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.