Button click on Web Dialog opens its copy in new window

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Button click on Web Dialog opens its copy in new window

    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=1 80px;dialogWidth=400px;hel
    p=no;status=no;resizable=no');" & vbCrLf

    strScript += "</SCRIPT>"

    Page.RegisterStartupScript("frmFacetOpen", strScript)

    End Sub


    robertm Guest

  2. Similar Questions and Discussions

    1. Click on sort link on a datagrid opens new window
      I have a modal dialog displaying a datagrid control. Click on the column header to sort the datagrid opens a new window with the following in the...
    2. Open window on button click
      Hi there, in a form, here's what I want to do : <input type=button onclick= (???) is it possible to open a pop-up window with a specified...
    3. In web browser to view pdf, click link and it opens in same window
      Customers download pdf from a server into a web browser with multiply links in pdf. When you click the links I want it open in a new window so the...
    4. want to open a new window on button click!-jscript or javasript
      Hi all... I am able to select a student's story and open it in a word doc. the teacher then corrects the story, highlight in colors the comments,...
    5. Close a window after button click
      The user clicks a buuton and the server does some processing. If successful I want to close the window. Any suggestions? Steve
  3. #2

    Default Re: Button click on Web Dialog opens its copy in new window

    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
    ==============================
    "robertm" <robert.must@illustrateinc.com> wrote in message
    news:%23t0E3ACYDHA.2204@TK2MSFTNGP12.phx.gbl...
    > 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=1 80px;dialogWidth=400px;hel
    > p=no;status=no;resizable=no');" & vbCrLf
    >
    > strScript += "</SCRIPT>"
    >
    > Page.RegisterStartupScript("frmFacetOpen", strScript)
    >
    > End Sub
    >
    >

    Vidar Petursson Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139