Button click on Web Dialog opens its copy in new window

  • Thread starter Thread starter robertm
  • Start date Start date
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
 
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
==============================
 
Back
Top