Solved

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

Posted on 2004-10-13
3
234 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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