bcox

bcox

  • NA
  • 1
  • 0

Returning Values from a Javascript Popup to a Web User Control

Sep 8 2004 1:02 PM
I am creating a complex page that uses the Placeholder control to dynamically load child controls based on a tab strip. The parent container page has a tab control that loads the detail section (lower portion) of the page. One of the detail Web User controls needs to call a Modal Popup Dialog window from a form based button which allows the user to select a value from a databound list on the popup and return it to a textbox in the Web User Control. I'm using Control.Attributes.Add() to add Javascript to the button that launches the popup window and calls the JavaScript ShowModalDialog() function. I capture the selected value from the popup and return it to the parent window. Most of this works fine with one excpetion. When the popup returns control to the parent or calling page, all I get is the Containing page, not my dynamically loaded control which of course is where the returned value needs to be. The tab (i.e. Web User Control) is initiallized in the Page_Load of the parent page. That page shows up correctly, but the Web User Control is not reloaded with the containing page. Why does this not work? How can I get the entire page to refresh with the Web User Control loaded when returning from a Javascript Popup Window? Note that the tab reference is passed in the QueryString. The URL looks correct when returning from the Popup... Why does the Page_Load not fire...? Can someone give me a clue on this...? Thanks in advance...