Solved

Force Control Refresh from External Window

Posted on 2008-06-21
9
398 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
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.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Find out what you should include to make the best professional email signature for your organization.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

808 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