Web Forms :: How To Open Link In New Tab In All Browsers
Oct 18, 2013How to open link in a "New Tab" in all the browsers, after clicking on Image button ?
The code that i used opens link in new browser window, but i want it to open in new tab.
How to open link in a "New Tab" in all the browsers, after clicking on Image button ?
The code that i used opens link in new browser window, but i want it to open in new tab.
I am a bit confused on how ASP.NET session works with my site, when a user opens up the site in multiple browsers, and/or multiple tabs. I see that after logging in with IE, i can open a new tab and not have to log in, and that if I log out of one tab, the other one will redirect to login after I try to do something. I also notice that if I log in with IE, i still have to log in with FF. My question - are session data shared between all of these sessions?
View 3 RepliesMy pdf file open in new tab using chrom and firefox.In opera it is open in new window.but i want pdf file open in new tab.
View 1 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 RepliesIn Visual Studio, when I click > Debug, > Start Without Debugging, (with my default browser set to IE), the application starts but it opens 2 IE browser instances. It opens 1 IE instance to start BUT when I close it, it launches another browser instance with the same start page. This bug is repeatable and consistent behaviour, that I can reproduce on-demad in IE.
(In some other minor variations, it seems that depending upon exactly how I start it, it will open 1 browser instance with 2 tabs, each tab having the startup page in it. However, this is not yet repeatable or consistent. It has happened; but, as of now, I am uncertain as the the exact steps to reproduce this particular variation of the anomaly.)
I am using Internet Explorer 8 (IE8).
I am using on Windows 7 32-bit.
I am using Visual Studio 2008 Standard.
I only have 1 startup project defined in Solution properties.
I have all Toolbars And Extensions set to "Disabled" in IE.
I have turned off "Automatic Crash Recovery" in IE.
(This does NOT happen in FireFox.)
I have a Link in my Gridview and when i click it i want it to open in a page with certain "design".
I want when i click the link to take its ID and pass it over the handler.
Like for exaple clicking on a news Title and open the article to view the entire article.
I 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# ?
I am trying to navigate it to another page using Link Button and in the .cs file, I am using Response.Redirect. But I want it to the open in a new window.
The reason why I cant use hyperlink is I cant use Command Arg and Command Name which I am using in the Link Button.
I tried the below Javascript, But it's coming as a pop up for the first time when it loads. I don't want it in that way also.
Is there a way like Hyperlink '_blank'.
public static void OpenNewWindow(string url, Page thispage)
{
string fullURL = "window.open('" + url + "', '_blank', 'fullscreen = no, status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,titlebar=yes' );";
ScriptManager.RegisterStartupScript(thispage, typeof(string), "OPEN_WINDOW", fullURL, true);
}
.cs
<asp:LinkButton ID="lbtn_photo" runat="server" Text="Upload Photo"
OnClick="Upload_Photo"></asp:LinkButton>
protected void Upload_Photo(object sender, EventArgs e)
{
Response.Redirect("UpPhoto.aspx?id=" + Request.QueryString["id"]);
}
I have an html page which contains link to open pdf file. however this link opens in adobe reader when i click on it. I have set target property to blank. but it doesnt work either. I want to open this pdf file in new tab in the same window.
View 6 RepliesI have a requirement where i need to open excel file from system using link
i build link from code <a href="path fo file">
but this does not work from aspx page
if i put same thing in seperate html page nd run it works fine
I have a ppt in a folder Rocky and i am doing something like this :
this.btnSmartQuoteTutorialVideo.OnClientClick = "OpenMaximizedWindow('Tutorials/Paoli/PaoliSmartQuoteTraining.ppt'); return false;";
I have a master page that contains a menu, the menu contains links to pages outside the website, how do get those links to open up in the main contentplaceholder of the master page? I tried setting the target to the ID of the contentplaceholder but that didnt work.
View 2 RepliesI have an iframe inside that there is a linkbutton if i click it should open a new tab in that browser,or Unblockable POPup's. I cant change it into other controls like Hyperlink or <a> tag, coz i am doing an DB updation in that linkbutton click event also passing values in query string.
View 7 RepliesI want when any user right click on Image button or link button on my website at that time I want him to show open in a new tab.
The event has been created on Datalist_Itembound event and from their I am redirecting user to another window.
I have Five Web part Zones in my page and each one have Gird control.
I have Five link buttons in same web page.
My requriemnt is when Any webpart is closed, when click on corresponding link must open the corrsponding closed webpart.
I am tring to open the panel with clicking linkbutton and to close the same panel using that link button .How can i write close and open in one event .
View 4 RepliesI am having one gridview in my asp form with one of the template field as imagebutton.
1. when i click on imagebutton the corresponding user profile opens in same tab....there is no option for open in new tab on right clickk..
open the user profilee in new tab.
i am using web.sitemap
i have an iframe in my page
i want that when i click a link from web.sitemap the page will open in iframe
how can i do this?
I have designed menu using <ul> and <li> tags and handled onserverclick event, where redirection code is written. This code works fine for normal click. But when I right click on the link and select "Open link in new tab", it opens blank page. So how can I handle this scenario.
Following is the sample code,
<ul class="rounded-corners "> <li name="menuSample"><a onserverclick="lnk_clicked" runat="server" href="~/Sample.aspx" title="Sample">Sample</a></li>
</ul>
Server side code:
protected void lnk_clicked(object sender, EventArgs e)
{
strPage = (sender as System.Web.UI.HtmlControls.HtmlAnchor).Title.ToString();
Response.Redirect((sender as System.Web.UI.HtmlControls.HtmlAnchor).HRef);
}
Window.open javascript function is not working in Mozilla, but working in other browsers, here is what I have write.
<a href="javascript:window.open('../Terms.aspx','Terms','width=550,height=400')">
click here</a>
Actually what happened in Mozilla is popup is opened but parent window is blank with [object Window]
i have to open the popup on from the gridview's linkbutton, bnut it open on the double click, not on the single click.
LinkButton btn = sender as LinkButton;
i have gridview with link button.. if i click on link button to open new window with pdf file.
View 1 RepliesI have used a LinkButton as Text "D:NewFolder".I want when user click on the link the "NewFolder" folder will be open as windows explorer !
View 1 RepliesI know this is probably a pretty normal pattern, but, I've never had to code it up. I'm using a GridView to display various items from a SQL query. I can do this without any problems. Upon selecting a specific item, I want to open a new page based on the selected row item link that passes some parameters to a SQLDataSource in the newly spawned window. I know I can use the javascript window.open function() to create a new window, but, I don't know how to pass the desired code to this new window.
View 1 RepliesI'm in a bit of a pickle here. I'm Binding the name of file to a LinkButton and intending to open that file on the LinkButton' click. I have the LinkButton in the TemplateField of a GridView control. Below is the code I'm using : And the Event Handler goes like : protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("goto")) { fileToOpen = e.CommandArgument.ToString(); Response.Redirect(path + fileToOpen); } }
View 3 Replies