Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Starting Page in new Browser window
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00878832
Message ID:
00879217
Vues:
38
>Gerald,
>
>The original page will still be shown in the original browser. A new window will appear that contains the new page. The user will have two windows to interact with.
>


Ok, you dont post back ONLY the script :-)



>>>Hi Fred,
>>>
>>>You must do this with client side code such as javascript. From your code behind you can use this line to pop up a new window as soon as the page is posted back to the browser:
>>>
>>>
>>>Response.Write(@"<script language=javascript>window.open('MyWebPage.aspx','_blank')</script>");
>>>
>>>
>>
>>
>>The original window will be empty with this... no?
>>
>>
>>
>>>>>>I feel like an idiot because I'm sure the answer is staring me in the face.
>>>>>>
>>>>>>I use Response.Redirect() to fire a new page off in the current browser window.
>>>>>>How do I fire the new page off in a new browser window?
>>>>>>
>>>>>>thank you in advanced.
>>>>>
>>>>>Put target="_blank" in your link tag or form tag.
>>>>
>>>>Giving all the information up front would save some time.
>>>>
>>>>This is not an option. I have a DataList driven menu system. My menu options reside in a SQL Serve table. I have a custom control on each page that queries that mennu table and builds the menu based on the page. When the user selects a menu option, a method is run with the page that needs to be displayed as a parameter.
>>>>
>>>>private void datlstMenuPage_ItemCommand(object source, System.Web.UI.WebConstrols.DataListCommandEventArgs e)
>>>>{
>>>> string lcCmd = e.CommandArgument.ToString().Trim().ToUpper() ;
>>>> if (lcCmd.Substring(0,4)=="HTTP")
>>>> {
>>>> // calling different web site
>>>> Response.Redirect(lcCmd,true)
>>>> // Need code here instead of redirect to open new window for the site passed.
>>>> }
>>>> else
>>>> {
>>>> // calling page from this site
>>>> Response.Redirect(lcCmd,true)
>>>> }
>>>>}
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform