Showing posts with label opens. Show all posts
Showing posts with label opens. Show all posts

Wednesday, March 28, 2012

Modal Popup and MasterPage

I have several modalpopups on a page that is inside of a MasterPage. The popups work fine, but in IE, the modalpopup opens inside the content area rather than over the entire page. I've searched these forums and have not come up with a solution. Does anyone have any ideas?


http://forums.asp.net/ShowPost.aspx?PostID=1357977 - and maybe vote on the work item to address this.

Saturday, March 24, 2012

modal window (asp.net ajax page) not closing

Hello, I'm creating a pop up using 'window.showModalDialog', the page that opens is a asp.net ajax page. I'm displaying a gridview on this. When user selects a row from the gridview, i need to store the selected value to session variable and close the popup window. I'm using the below code on the select image button click. If i manually closes the popup window, it get backs to the parent. The code on click event is

ProtectedSub OnSelect(ByVal senderAsObject,ByVal eAs CommandEventArgs)

Dim strScriptAsString ="<script language='javascript'>window.returnValue='" + retVal +"';window.close();</script>"

If (e.CommandName.Equals("cmdSelTag"))Then

Session(Utility.Constants.SelectedTagDefinitionId) = e.CommandArgument.ToString()

IfNot ClientScript.IsStartupScriptRegistered("clientScript")Then

ClientScript.RegisterStartupScript(GetType(Page),"clientScript", strScript)

EndIf

EndIf

EndSub

Note: If make it asp.net page rather than asp.net ajax page, then this works fine.

Any help is appreciated.

Hi.. i used ScritManager.RegisterStartupScript instead of ClientScript.RegisterStartupScript. Now its working.