Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening page in new window
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00792914
Message ID:
00793262
Vues:
32
Hi Winan,

To Open the page in Code-Behind do the following:
Dim sUrl As String = "MyPage.aspx"
Dim sFeatures As String = "'height=320;width=160;left=100;top=50'"

' Create a client script to open the window
Dim sScript As String
sScript &= "<script language=javascript>"
sScript &= "window.open('" & sUrl & "',''," & sFeatures & ");"
sScript &= "</script>"

' Write it into the output stream for immediate execution
Response.Write(sScript)
To Open using Javascript on the client side:
<a href="javascript:my_window=window.open('MyPage.aspx','my_window','height=320;width=160;left=100;top=50');my_window.focus()"> Go to MyPage</a> 
There is no straight-forward way to disable the back button since the browser does not expose those functionalites through its object model. However, you could open a window with no menubar/toolbar/addressbar, and
disable context menu.


>I am very new with this, I want to open the page by using below code:
>
>response.redirect("mypage2.aspx")
>
>my question is very simple:
>
>1. how do I open it in new window?
>2. how to disable "Back" button if user already move to new page? (eg. for "Login" page ..when user has passed his/her password .. he / she is not allowed to go back to the "Login" page ..
>
>many thanks
>
>Winan
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform