Button click on Web Dialog opens its copy in new window


R

robertm

I have an aspx page which I open using the following code fragment below.
The modal web dialog has 2 buttons and whenever I click any of them, a new
window
containing my web dialog form is opened prior to getting to OnClick event
logic
of the buttons. The buttons are part of a user control placed on the form.

How can I get rid of the new window being launched?

Private Sub cmdFacet_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdFacet.Click

Dim strScript As String

strScript = "<SCRIPT language='javascript'>" & vbCrLf

strScript += "window.showModalDialog
('frmFacet.aspx',window,'center=yes;dialogHeight=180px;dialogWidth=400px;hel
p=no;status=no;resizable=no');" & vbCrLf

strScript += "</SCRIPT>"

Page.RegisterStartupScript("frmFacetOpen", strScript)

End Sub
 
Ad

Advertisements

V

Vidar Petursson

Hi

Depending on what you are doing...
<base target="_self">
Or place a iframe in the dialog and host the page there

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top