Web Forms :: How To Open Pop Up Window
Aug 30, 2010i'm interested to know how can i open a small pop up window when clicking a button, not a new tab, but a new window.
i'm interested to know how can i open a small pop up window when clicking a button, not a new tab, but a new window.
i have an aspx page in which a link in the grid view opens a popup page . the data in the grid view would be dynamic and i need to send the id of the row of grid while calling the child window. i get the id using sender.id, but how would i send this using window .open()?
View 2 RepliesI have a login page that is loaded in popup window (colorbox) and after user logs in it should be closed and parent window should be loaded with new page.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Do While reader.Read()
If Trim(reader("ZAP").ToString()) = Trim(textBoxZap.Text) Then
Session("A") = "1"
Response.Redirect("~/default.aspx")
Else
lblErr.Text = "incorect"
End If
Loop
So once the buton is clicked and user name and password is corect popup window should be closed and user redirected to default aspx.
I am trying to open a popup window from main window using window.open() method. How to get back the value from the called popup window to the calling window in vb.net, basically i need to get back the value and populate in the text box available in the main window.
View 3 RepliesI have an asp.net page that contains an Iframe embedded with some data and a ImageButton. On ImageButton click event (server side) I have Response.Redirct:
Response.Redirect("results.aspx");
This always open the results.aspx in iframe. I want that results.aspx should always open in the parent window. I tried the following till now but none worked:
Response.Redirect("<script language='javascript'>self.parent.location='results.aspx';</script>");
Response.Redirect("javascript:parent.change_parent_url('results.aspx');");
..and also tried the options from [URL]
Click imagebutton open window.open in class asp.net 2.0
View 2 RepliesHow do I pass a window name to window.open(url, windowname) programmatically? I am using a user control inside aspx forms. I want the windowname to be different, so from each link a separate window opens.
I have an asp:hyperlink in a .ascx form. The code looks like this:
<asp:hyperlink runat="server" id="xx", navigateurl="is set programmatically" onclick="javascrip:return popup(this, 'my window'; " text="xxx"/>
'my window' needs to be a variable.
I have an aspx page which contains a user control(a gridview). When I click on a link button in the gridview, I will open a popup window(An aspx page) successfully. When I click on save button in the popup, I am saving the details and refreshing the parent page successfully. I have a button in popup window. My requirement is:
When I click on the button inside popup window1, I would like to open another popup(aspx)(Say popup window2) in a new window without closing popup window1. When I save some changes in popup window2 and click on save button in popup window2, I need to close it and refresh popup window1.
we are running a click-to-call service, my idea is basically like this: website have a link on their page, when the link is clicked, a web page(say it is popup.aspx) hosted on our server is popup, user can input their phone number, and click "call me" button to let the website call him. In the button click event, I want to get Request.UrlReferrer, then query the db to get website's phone. But in IE, Request.UrlReferrer is null(firefox is ok, not test chrome yet),my question is how to get opening window' url in IE? we put popup.aspx on our server because
our client website is not force to use asp.net. we have the control what we put on the popup window, and can modify the page just from our side, if we put the pop window on our partner's side, if we have 100 partner, and we change the page's design, we will notify everyone of them to change this, change that. we can implement a statics system to know how popup a day, which site is most popular,etc
I am using the javascript to open a child window using window.showModaldialog(), i have retuen a value from the child page is working fine in IE and firefox but is not working in chrome browser, is there any work around or alternative for it to work in chrome as well.
View 2 RepliesI using VS2008 and C# for an ASP.NET web application. From within C# code, how to use the "Window.Open" method to create a new browser window? I know it can be done in ASP script code using Javascript but I would like to create new window from C# as desired.
View 11 RepliesI am trying to open a file share link from the window.open ... but its adding the http://localhost/vdir/ before the path can any one say what is the problem?
View 1 RepliesQuick one. I've created a PDF using iTextSharp and want to open it straight away inside a new window. I've tried the following to no avail:
[Code]....
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
[code]...
I'm using the following span to open a page in a new window. What is INCREDIBLY odd is that it is exactly the same code from three different pages, but the first refuses to open in a new window. The only difference is that the first example resides within an Ajax Accordian Panel so I suspect that it might be an Ajax related issue.
[Code]....
Is it possible to Open a new browser tab/window using c#. I have query string info I don't want to put in a hidden field due to it showing on the client side. I do save the data in ViewState and encrypt the viewstate; however, I don't know how to access that information on client side.
I can access the viewstate data fine on Server Side but I need to open the new browser window on server side in order to access the ViewState. I may be wrong. Is there a trick to this?
I did find a way; however, on any other click after the initial click everything goes to a new window:
Control:
[code]....
how to open the second pop up window. as i always replace the extisting pop up window if type the following code:
Page.ClientScript.RegisterStartupScript(this.GetType(), "openpopup"
"<script language="javascript"></script>)o;
I have a button that once clicked it open a pdf file in the same window. I need to be able to open in a new window
How can I open this pdf in a new window.
[Code]....
The reason for my request is that before a user click on print report, a user click on a button to make some of the controls on the page grayed out - enabled = false; so when a user click on print report, a pdf document open BUT once he click on return back in the browser, all the controls that were grayed out are back. so how to fix this issue. i thought to open a new window for the pdf.
How do you write C# code to open up a New Browser window with for example [URL]
View 4 Repliesi am using one Xml file in my application . now i want to open new window when i am clicking the image in Xml file. i am sharing my code below
<xml
version="1.0"
encoding="utf-8"
?>
<Advertisements>
<Ad>
<ImageUrl>
</ImageUrl>
<NavigateUrl>[URL]</NavigateUrl>
<AlternateText>[URL]</AlternateText>
Keyword>A</Keyword>
<Impressions>Technology</Impressions>
<Caption>This is the caption for Ad#1</Caption>
<Ad>
<ImageUrl>[URL]g
</ImageUrl><NavigateUrl>[URL]
</NavigateUrl><AlternateText>[URL]</AlternateText>
<Keyword>s</Keyword>
<Impressions>Web Site</Impressions>
<Caption>This is the caption for Ad#2</Caption>
</Advertisements>
I am using crystal reports 2008 with asp.net 3.5 to generate .pdf reports. When I use the code below it exports the pdf file in the same application window. I hate this. I have to go back for getting another report. I want this to be opened in a separate window so that users can still work on input parameter page.
RecDetrpt.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Context.Response, false, string.Empty);
I have a PDF help document that I would like to store on the server. When a user is on the site and clicks on the help link, I would like it to open the PDF help document and go to a particular page, depending on where the user was when they clicked on the link. For example, if they are on the Staff Projections page when they clicked the help link, I would like the PDF to open in a new tab and automatically go to page 32 which contains information about Staff Projections. I am running .NET 3.5, and the company uses Internet Explorer 8.
View 2 RepliesHow can I refresh the current page after I opened a new one using javascript. Code below works great if its last command in method but when I add "Response.Redirect(Request.Url.AbsoluteUri) after, it doesn't work anymore.
[Code]....
I am using an Image button in a gridview and I want it to open in an new window when I click that image button. How should I do that?
View 6 RepliesI am using an asp:button to open a url link :
protected void redirectTo_OnClick(object sender, EventArgs e) {
Response.Redirect("http://www.google.com");
}
This link open itself in its own window , i want it to be opened in other window just link we do in html
< a href="google.com" target="_blank"></a>
How to do this in c# ?