Solved

Force Control Refresh from External Window

Posted on 2008-06-21
9
395 Views
Last Modified: 2008-08-11
Is there any way I can force refresh of a particular control from an external window such as an Iframe or Popup window?
0
Comment
Question by:digitalZo
  • 5
  • 4
9 Comments
 
LVL 7

Expert Comment

by:kGenius
ID: 21837123
Hi,

maybe this article can help you:
http://www.codeproject.com/KB/webforms/GridViewRefreshFromParent.aspx

the javascript part is the one you can use.

HTH,
Karl
0
 
LVL 10

Author Comment

by:digitalZo
ID: 21837242
Thanks for the help. But i assume that would refresh the whole page. i dont want that to happen. only the control should refresh.

here the control is actually a dropdown. as soon as i close the frame, the dropdown should automatically refresh.
0
 
LVL 7

Expert Comment

by:kGenius
ID: 21837336
You can use Ajax on this.
Put your control in an updatepanel, then call a javascript function (when closing the form - shown in previous link) that updates the panel.
Have a look at http://encosia.com/2007/07/13/easily-refresh-an-updatepanel-using-javascript/

HTH,
Karl
0
 
LVL 10

Author Comment

by:digitalZo
ID: 21837838
No.AJAX.

Please suggest another solution. I really need it,
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 7

Expert Comment

by:kGenius
ID: 21837942
Maybe you can put the control in an IFrame. Then let the form in your IFrame be submitted. The IFrame is posted back, the rest of the page not.

Don't know if it'll works, just a thought.

Karl
0
 
LVL 10

Author Comment

by:digitalZo
ID: 21843869
<<<Maybe you can put the control in an IFrame. Then let the form in your IFrame be submitted. The IFrame is posted back, the rest of the page not.>>>

You did not seem to have understood my problem..
0
 
LVL 7

Expert Comment

by:kGenius
ID: 21844558
I do understand your problem, though.
But I think, to solve your problem, you should use AJAX, or post the entire page back. I don't think  it't possible to refres one control on your form, without posting back the entire page, or using AJAX to rebind the data in your control...
Karl
0
 
LVL 10

Accepted Solution

by:
digitalZo earned 0 total points
ID: 21844807
Can you suggest an alternative? Like any other logic, apart from using AJAX?

I want a dropdown 'BC' to update with the data that is coming from an IFrame and keep it as selected. When other dropdowns do autopostback, the data of the dropdown 'BC' should remain intact. this is actualyl what i want.
0
 
LVL 10

Author Comment

by:digitalZo
ID: 21844813
If I use Sessions, it'll become a lot more complicated..
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now