Way To Programatically Open A New Tab On The Current Window
May 5, 2010way to open a new tab on the current window? I'm thinking to have a control button on the webform and have this control button to open a web page on the new tab.
View 2 Repliesway to open a new tab on the current window? I'm thinking to have a control button on the webform and have this control button to open a web page on the new tab.
View 2 RepliesI have a page that creates a pdf and opens the pdf. I use response.write with javascript using window.open to make the window open with the pdf, works fine. I then want the main window to do a redirect to a message page. But soon as I add code to do that (either more javascript using location.href or response.redirect, it does that but the window.open no longer works. It's like it's running the redirect before it really has a chance to finish the window.open. Is there a better way (a way that works LOL) to accomplish this?
View 2 Repliesi 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 Replieswe 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 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 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 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.
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]....
I 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 Repliesif (TextBox1.Text == row["UserName"].ToString()
&& TextBox2.Text == row["Password"].ToString())
{
//here i have to reload the page
Button1.Attributes.Add("onclick", "alert('Login SucessFull')");
break;
}
how to refresh the current window using c# in asp.net
while opening a new window we can use
window.open('Login.aspx', '_blank', 'height=500,width=1000,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,titlebar=no');
But how can I remove a toolbar for the current windoe.
To resize I am using
function noresize()
Quick 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]....
have a HyperLink control and a grid control on my .aspx page.
When user's start editing the content of the grid control, I create an ascii file and assign the location of the file the Hyperlink control using the following code.
Code:
hyperLinkFileOpen.NavigateUrl = fileName;
When the user's click on the hyperlink control, I want the file to be be opened in a new window. How can I do that? I browsed and found something below. But this doesn't work for my case because the fileName is created on the fly and I won't know the name and path of the file at design time.
Code:
[code]....
I can't use RegisterStartupScript('window.open...), because Chrome blocks the popup without even informing the user.
I can't use "onclientclick=window.open(..." in the markup, because I have to invoke code in the button click event handler before opening the popup window.
I can't expect every user of the website to add the site as an exception in Google Chrome's popup blocker, since they'll assume it's an error on the website and not with the popup blocker.
So what other options do I have?
I have a button which redirects the user to another page. Instead, I would like this button to open a new window that points to this location.
aspx:
<asp:ImageButton ID="img_url"
CommandName='<%#Eval("url") %>'
OnClick="img_url_Click"
runat="server"
ImageUrl="~/images/products_details.png"
/>
cs:
protected void img_url_Click(object sender, ImageClickEventArgs e)
{
ImageButton img = sender as ImageButton;
Response.Redirect(img.CommandName.ToString());
}
I have a Menu control on MasterPage. Even though I set Target="_blank" why doesn't it open in new window? What do I do to open the page in new window?
[Code]...
I would like to redirect a user into a new window.
public ActionResult Index(FormCollection form)
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
[code]...
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 linkbutton in mypage
when I click on link button it redirect to other page.
I want when I click on linkbutton it open page in current page...
some thing like:
Target="_parent"
in hyperlink...