Problem opening a popup window from a user control that is inside another user control inside a aspx page

Hi All,

I am trying to open a Lookup popup window (on a ImageButton click) from inside a address user control that I created. Just an FYI, the address user control (.ascx) is inside a main user control (.ascx) in a aspx page that is using a master page. When I click the Image button, I am tring to excute the following code in the code-behind of the address.ascx-

*****************************

        string stateCode = some value;
        string popupScript = "<script language='javascript'>" +
          "window.open('ZipCodeLookup.aspx?stateCode=" + stateCode + "', 'ZipCodeLookup', " +
          "'width=875, height=300, resizable=no, scrollbars=1')" +
          "</script>";
        ClientScriptManager cs = Page.ClientScript;
        cs.RegisterStartupScript(typeof(Page), "PopupScript", popupScript);

**************************

The problem is if I put the Lookup ImageButton inside my address control and click, it shows a hourglass cursor and no response, but if I put my ImageButton in the main ascx control, it is able to open the popup. Any idea what's going wrong here?

Thanks,

Roy 

 

 

 

0
sdroy
7/17/2008 9:27:40 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
1436 Views

Similar Articles

[PageSpeed] 27
Get it on Google Play
Get it on Apple App Store

have you tried to run it inside firefox with firebug to check for errors? have you tried to view the source code file generated from your asp.net compiled page? save as html and see if you can run the script...

when you are placing your script block with your address control, it is maybe inside some html tag that is blocking the correct reading of your page. maybe the script block is outside your form tag.

i can only guess you some stuffs since i cant see your entire app...

 

it can also be an error trying to find your Page.xxxxxxxx since page is not the parent of the control you are using... idk

0
ixxx
7/18/2008 2:36:17 AM
Reply:

Similar Artilces:

User control inside another user control data binding problem
Hi allmy problem that drives me crazy for already 2 days is the following...I have a page default.aspx, user control UserProfilesList.ascx, and another user control UserPic.ascx inside the first one like this (UserProfilesList.ascx) <asp:DataList ID="UserPicsDataList" RepeatColumns="5" runat="server"> <ItemTemplate> <uc1:UserPic ID="UserPicViewer" UserId='<%# Eval("ID") %>' runat="server" /> </ItemTemplate></asp:DataList>----------------------------------------------------...

FileUpload control inside UpdatePanel inside user control inside popup
Hi,     The Asp.Net File Upload control is not working inside update panel. Acutally i have put the FileUpload control inside User Control again inside update panel. Since the update panel does async postback. The posted file is null in the server side. When i do full page level post back it works. but i have to put it inside update panel. How to do it? Becuase the FileUpload control should be in Ajax Model Popup Extender where i have to put update panel to avoid closing of popup after fullpostback. Since the ajax model popup extender is getting closed after full post b...

how to use an user control inside another user control?
as title, I can't wirte an user control inside an user control. how's the solution? thanks... you can. Then you gotta use the FindControl() method to manipulate it."Never argue with an idiot; He will drag you down to his level and beat you with experience"...

User Control inside User Control
I have an ASPX with user controls in it called UC1.There is another user control called UC2 within user control UC1.(UC1 - parent , UC2 - child) What I need to do is to pass value of the text box that’s located inside user control UC1 to UC2. This is the code I put into  user control UC1. How to I read it in User control UC2? Public ReadOnly Property propCountryName() As TextBox Get Return Me.txtCountrygName End Get End Property    Thank you100 years live, 100 years learn Hello, In UC2, try the followin code Dim tb As TextBox=CT...

User Control inside User Control
I have an ASPX with user controls in it called UC1.There is another user control called UC2 within user control UC1.(UC1 - parent , UC2 - child) What I need to do is to pass value of the text box that’s located inside user control UC1 to UC2. This is the code I put into  user control UC1. How to I read it in User control UC2?   Public ReadOnly Property propCountryName() As TextBox Get Return Me.txtCountrygName End Get End Property    Thank you100 years live, 100 years learn You can define a property inside the UC1 and UC2. Pag...

user control inside a user control
i've currently got one of my pages setup so that I have a user control, CreateMessage.ascx, inside my main user control, ViewChangeMessages.ascx. My problem is that i've got a method inside my main usercontrol that either hides or shows the second user control, but it doesn't work, mainly coz i found out that the second user control is loaded before my main one. Is there any way i can get around this? You could try to load the second user control programmatically the OnPreRender method of your main user control. You'll need to add a placeholder in the spot you want the user control to...

User Control Inside a Modal Pop Up
Hello, I am a beginner with AJAX and need some help. I have a user user control that I want to place in a Modal Pop up, but I am running into some issues.  The user control is used for doing some seaching of database records. After the use selects a record, they choose from one of three radio buttons and then hit a submit button. This submit button has logic tied to it that needs to be performed before closing the modal pop up. I want to make this button (btnDoLogic) that is inside the User Control, the button that is tied to the...

Embedded user control inside a user control
Hi, I have a user control that displays some details in a repeater, with a view buttons etc. I have now developed a second user control that is intended to provide a visual frame around something. I wanted to the HTML to look something like: <frameControl id="myFrame"> <myUserControl id="testControl" /> </frameControl> but when the page runs I get an error saying FrameControl does not have a property called myUserControl. It's right it doesn't! Inside the frameControl I just want to know who the children are. At present I have ha...

Creating a User Control validator that validates a control on the page, rather than inside the control.
I'm trying to create a custom user control that is nothing more than a RangeValidator that validates other controls that lie on the page rather than inside the control itself... is this possible, is there a way to "bubble" it up. Thanks, G My answer to your other question regarding the CompareValidator applies here. If the custom control is in the same naming container AND does not implement INamingContainer, you can create a property that lets the user assign the control to validate. Internally assign the Validator.ControlToValidate property to the value of that property.-...

Menu control inside user control located inside Master Page does not work
When I click on any munu items, looks like nothing is getting selected and even MenuItemClick event is not firing up. Any idea?I have defined a menu control with SiteMapDatasource control inside a user control which is located on Master page. Any item selection does not anything...Thanks,Noreen Noreen,The default binding for a Menu control connected to a SiteMapDataSource is to navigate.  It's possible that you're navigating back to your same page?  To get around this you should create a custom databinding and bind the TextField to Title.  Let me know if this doesn...

Set the property of a server control inside a user control inside a Master Page
How do you set the property(ForeColor) of a server control(lnkInquiryReport2) located in a user control (LeftNavMain1) within a Master Page (default.master)? On the user control, expose a property of type color and bind this to the forecolor for the hyperlink control [keep some default value]. On your master page expose the user control as a property. On your content page, access the uc via the master's prop and the forecolor prop via the uc's prop and set it. Instead of exposing the uc from the master, you can also find the uc on the master - cast it to the correct type and then access th...

Web user control inside update panel replace with another web user control
 Hi there. I have a page with a menu. an and then the content. My thing is. That i have the update panel, and inside that i have a regual panel in which i add the Web User Controls i need. Which all works fine. My problem is. That i i have a submit funcion on almoast all the Web User controls. What i would like is that i inside that update panel, can dispose the original Web user Control and then add a response Web User Control. In normal language. Is there a way that i can load one web user control into antoher and then disposose the original? Thanks in advance hello. well, what ...

how to raise server control event(control defined inside user control) from host page?
I have built a user control(using c#,net 2.0,VS2005,MS-SQL server 2005),which contains set of 3 button,save,cancel and next and wud be reused/displayed in multiple pages.As the name says,they are suppose to update on save,reset the fields   on cancel and navigate to another page on next.How do i raise the onClick event for all of these button individually,from the individual host page?I do not have/do not prefer any logic,event handler etc.. defined in the user control for these buttons,since every host page have different set of parameters for save,cancel etc.Thanks...

Rating control: Multiple instances of user control with Rating control inside errors on Page
The Rating control errors when you use it within a user control that you have multiple instances of on the same page. Assertion Failed: Duplicate use of id "Rating1_RatingProperties" for object of type "AtlasControlToolkit.RatingBehavior".Microsoft MVP - Windows Live PlatformBlog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Virtual Earth Control I am having the same problem trying to use the Rating control inside of a Repeater control. I tried to ad  a unique ID to each of the Rating controls but got the same results. Have you looked at the Rater control at krispwar...

Web resources about - Problem opening a popup window from a user control that is inside another user control inside a aspx page - asp.net.presentation-controls

Problem novel - Wikipedia, the free encyclopedia
Working class, or proletarian novels are often also social problem novels . This was in many ways a reaction to rapid industrialization , and ...

The Fitz Files: NRL decision about Sam Burgess deal with South Sydney exposes problem with salary cap ...
Let us call the salary cap what it is: an illegal cartel between employers to limit the earning capacity of its employees.

November 2015: Unofficial Problem Bank list declines to 255 Institutions
This is an unofficial list of Problem Banks compiled only from public sources. Here is the unofficial problem bank list for November 2015. Changes ...

Acampora on problems in the market
Master technician Ralph Acampora says he has some doubts about this "fractured" market.

Tri-Valley has no problem against Auburn to win 2A title
... form Search 39° Navigation Home Blackhawks Bulls Cubs White Sox Bears Fire Notre Dame Preps More Tickets Shop Watch Tri-Valley has no problem ...

Tesla Unveils ‘Cheap’ $80,000 SUV, As Problems Mount For The Automaker
Tesla unveiled an $80,000 “budget” version of its Tesla Model X SUV Tuesday as the company struggles to sell cars and burns through cash at an ...

New York's anti-terror reporting app could easily cause problems
New York state is understandably more anxious than ever about terrorist threats, and it's hoping that some mobile technology will bolster its ...

Can Los Angeles Solve Its Traffic Problem By Building More Roads?
The Reason Foundation publishes a Los Angeles transportation plan that embraces reality over dogma.

Family evicted, building deemed unlivable: Landlord cannot fix problems, he was murdered
... A Milwaukee family has been forced to leave their apartment. Their building has been declared unlivable. The landlord was required to fix problems ...

Icy roads causing problems for Thanksgiving travelers around Colorado Springs
Dress warm this holiday, temperatures Thursday are predicted to be colder...

Resources last updated: 11/28/2015 5:24:45 PM