.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Open page in a new window.

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
 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? Thanks for the help!! Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick If Menu1.SelectedValue = "Demand Reservation" Then rqstType = "Demand" Response.Redirect("frm_Reservation.aspx") ElseIf Menu1.SelectedValue = "Standing Reservation" Then rqstType = "Standing" Response.Redirect("frm_Reservation.aspx") End Sub <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" OnMenuItemClick="Menu1_MenuItemClick" style="height: 19px"> <Items> <asp:MenuItem Text="Reservations" Value="Reservations" Selectable="False" > <asp:MenuItem Text="Add Demand Reservation" Value="Demand Reservation" Target="_blank"></asp:MenuItem> <asp:MenuItem Text="Add Standing Reservation" Value="Standing Reservation" Target="_blank"></as

View Complete Post

More Related Resource Links

Open aspx page in new window or tab



    I use the following code in a Buttons onClick handler.



Is it possible to open the EIQuotationReport.aspx web form in a new window or a new tab? I could change the button to a hyperlink if required.



Open my aspx page in new window....

Hi..On button click im using this Server.Transfer("abc.aspx", true); to transfer to abc page.. what i need is i need to open in new window by this abc.aspx page on button click..here im passing parameter to abc.aspx page, so let me know how to do...so plz let me know how to achieve this....

I want to open a web page (.aspx page,child window from parent window) without titlebar how can we d


Hi All,

i have some special requirement like , i want to open a web page (child page) without a title bar for this i am following the below approach but it is not working, to open child window from parent window i am calling this javascript function to the of href of anchor tag...

function OpenChildWindow()

but the child window is opened with titlebar, but i don`t want any titlebar.

the titlebar property i was used in the above method is not working why?

how can we do this, can anybody help me...


Burepalli V S Rao.

Open .swf file thru web page on Window Mobile CE



I need to open the .swf file thru web page on platform window CE.

I got a .swf file which is saving in window CE mobile device on path: \My Documents\flash\ParallelParking.swf.

So when user browse the web page thru the mobile device, I need to open up the .swf file which is save in the particular path on the mobile device.

I try to using Process() to open the file but hits an RunTime Error:

"An Application error occurred on server. The current custom error setting for this app prevents the details of the app. error from being viewed remotely."

Please advise. Thanks.

Public Partial Class HomePage
    Inherits System.Web.UI.Page
    Protected Sub ImageButton5_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles I

how to open window in new page on button click


hi all,

Here's my code

        If rdvalue = "Dept" And ddldeptr.SelectedValue <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpDept.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&dep=" & ddldeptr.SelectedValue & ""
        ElseIf rdvalue = "Sect" And ddlsectr.SelectedValue <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CvGpSect.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&sec=" & ddlsectr.SelectedValue & ""
        ElseIf rdvalue = "Desig" And ddldesigr.SelectedValue <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpdesig.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&desi=" & designation & ""
        ElseIf rdvalue = "Emp" And txtempidr.Text <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpemp.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&emp=" & empid & ""
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpall.aspx

window.open a page from a child window



I want to ask how can i open a window from a child window....

I have a .ascx page when i click on a button i use javascript to window.open a .aspx page on this new page i want to have another button that opens another .aspx page using javascript window.open.

The problem is that window.open does not work the second time

Is there a limitation on the number of windows i can open?

How can i get the functionality that i mentioned above


Open ModalPopup dialog on page load


Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?

Open PopUp Window From Error httpModule


I would like to open a popup window from the assembly to present the information to the user. Does anyone know if this is possible, I am presently doing the following:

        WriteLine("body {font-family:""Verdana"";font-weight:normal;font-size: .7em;color:black; background-color:white;}")
        WriteLine("b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}")
        WriteLine("H1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }")
        WriteLine("H2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }")
        WriteLine("pre {font-family:""Lucida Console"";font-size: .9em}")

Open different page using Ajax Modal PopUp Extender Control

The article Open different page using Ajax Modal PopUp Extender Control was added by Chintan Dave on Thursday, July 15, 2010.

You May use Modal Popup Extender to open some part of the page as Popup. But there we don't have any property to open other html or aspx page in Popup window.We can do it using IFrame control. What we have to do, just add IFrame control in Panel that

Open a link in new window from a custom fields description MOSS 2007



I have kept a help link (ex: http://www.msdn.com) under a document library field's description. i want this link to be opened in a new window with out navigating from that page.

any ideas greatly appreciated.




Open Analytic Chart on New Page In Sharepoint


We have designed a Dashboard with single page

1. A Scorecard --Zone 1

2. Analytic Charts --Zone 2

When a person clicks on any of the KPI on Scorecard corrosponding Chart for that particular KPI is displayed in Zone 2.


So far So good

Now our client has come up with a requirement that

whenever he clicks a KPI the chart should open in a new browser window instead of Zone 2.

Is this possible in Performancepoint 2007 or Sharepoint 2007 if yes then how to accomplish this

Pop Up window on the load of the page in MVC



        I need an urgent help, when the page is loaded in the explorer, my code will hit the DB and if it fetches a record then I have to throw a pop up window when it loads the page. 

I have no idea on implementing this MVC. 

Can anyone help with this.

Kindly reply ASAP.


Page can't open together at IE tab


i devide my system to 2 part,Admin and User,which i develop it seperately.

when successful login,i using session on both page,with the same code :

FormsAuthentication.RedirectFromLoginPage(txtLogin.Text, False)
Session("userName") = myReader("uName").ToString()
Session("Role") = myReader("uGroupID").ToString()

Problem arise when i access both page at the same time,in 2 tab in the same IE7 browser.

if i login Admin 1st,then login for user,the Admin will auto logout.

and if i login user 1st then Admin,User will auto logout.

i not sure actually where the problem come from.anyone have any idea???


Cannot open a single page on my site.

hello Guys, i m facing a Problem while hosting a Website on dedicated Server. Actually we are shifting our website from 1 domain server to Other domain server. On previos Domain our webiste is running smooth, but i copied all webiste data and put in new server. I restore  the database from Old server to New server. I craeted a Virtual directory in IIS and set all net neccesssy parameters as required. But when I am trying to access the website I am Facing this Problem       Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off". <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>Notes: The current error page you are seeing can be replaced by a

>>> Open a Popup window on Successful Login if something new added to website.

Hi, I would like to open a Popup window in Parallel if user Login successfully. The popup will give updates to the user that what's new added to the website. The popup will open only once if user login. If he logout and will re-login then it should not popup as we'll assume that he has been notified earlier. I have users table with user id's. It is for information that I am working in Framework 2.0 and not allowed to use any third party or AjaxToolkit. Therefore javascript or any other technique will resolve the issue. Any idea with coding example would be helpful.

Window.Open in AJAX Accordian Panel Opens Link in Same Window

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. Ideas? Does not open in new window.<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">   Opens in new window<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">   Opens in new window<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">  

how to open 2 different windows from different buttons with window.open or...

Hello, I'm trying to open 2 different windows from different buttons with window.open Do not manage... Annyone  who knows how? I need code xample...   Is it posible to set ID for this window.open ?   Thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend