473,378 Members | 1,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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
Nov 17 '05 #1
1 1494
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" <ro*********@illustrateinc.com> wrote in message
news:%2****************@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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: snake_2k | last post by:
The button in the datetimepicker class that opens the calendar is too small for my touchscreen users. How can I make a regular button that opens the datetimepicker calendar ? I don't want to...
1
by: TD | last post by:
I created a new toolbar for my reports and need a button on it that opens (I'm not sure what the offical name of this window is) the Windows printer window where you can select which printer to...
1
by: bob | last post by:
I have a button on a web form in which I am calling some javascript. The button opens up another browser window as a dialog box. The problem is that I do not want the page to be resubmitted first...
2
by: Patrick | last post by:
i have the following .aspx file defined: ..... other tags here ... <asp:TableCell><asp:button id="AddButton" Runat="server" Text="Add New Vessel..."</asp:button></asp:TableCell> ..... other tags...
3
by: Raymond Lewallen | last post by:
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 location: ...
2
by: Samy | last post by:
Hi There, I have a user control with buttons on it which I use on a aspx page (parent page). On a button click, a modal dialog(aspx page) opens up and the user enters some info in the modal dialog...
1
by: Mantorok | last post by:
Hi all When I show one of my ASPX forms using window.showModalDialog(), and then click a server button on that dialog, it opens up a new window. Any ideas why? If so, how can I stop this from...
2
by: Bruce | last post by:
Hello, I have a form in an Access 2003 application which opens maximized. Its CloseButton property is set to false. On this form I have a command button that opens a report in preview mode. ...
0
by: chandan | last post by:
Hi, I have written an application for exporting grid data to excel using asp.net and c#.After writting the data in excel I save it in a folder inside my application.After that I invoke the file...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.