Solved

Force Control Refresh from External Window

Posted on 2008-06-21
9
397 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 10

Author Comment

by:digitalZo
ID: 21837838
No.AJAX.

Please suggest another solution. I really need it,
0
 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

803 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