Solved

How to do a pop-out window in asp.net?

Posted on 2004-10-13
3
233 Views
Last Modified: 2008-03-17
Where should I add the action in?
I want something like when user click on the button, it will pop-out the page with a new window.

should I add the action in
===========================================
private void btnSubmit_Click(object sender, System.EventArgs e)
            {
            
            }
============================================

or add in HTML code
===========================================
<asp:Button id="btnSubmit" style="Z-INDEX: 117; LEFT: 427px; POSITION: absolute; TOP: 273px" runat="server" Text="Submit"></asp:Button>
===========================================
0
Comment
Question by:p931226
  • 2
3 Comments
 
LVL 5

Expert Comment

by:stumpy1
ID: 12297458
Example to use a hyperlink to open Newpage.aspx in a new IE window

HyperLink linkItem;
linkItem = new HyperLink();
linkItem.NavigateUrl = "Newpage.aspx";
linkItem.Target = "_blank";
0
 
LVL 5

Accepted Solution

by:
kollu earned 40 total points
ID: 12299526
You can try this one
TableRow rowNew = new TableRow();                              rowNew.VerticalAlign = VerticalAlign.Top;
tblName.Rows.Add(rowNew);  \\table name is server side control
Str = "<img src=image.gif border=0 alt='' style = cursor:hand onclick=JavaScript:OpenpopUp();>";      
TableCell cellNew = new TableCell();
cellNew.Text = Str;                              rowNew.Cells.Add(cellNew);

in aspx file you can write Javascript function
function OpenpopUp()
{
var x=window.open("Openpage.aspx");
}
0
 
LVL 5

Expert Comment

by:kollu
ID: 12474547
Thank you for accepting my answer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Asp.net mvc entity issue 6 33
Achieve json result 2 65
Auto refresh part of an MVC5 View 7 63
Runtime Error 2 29
AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now