mike55 Posted April 5, 2004 Posted April 5, 2004 Hi guys, When i move between two pages i am using the Response.Redirect command, however in some cases i would like to be able to open up a new window. Any suggestions?? mike55 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
MorningZ Posted April 5, 2004 Posted April 5, 2004 you have one choice... javascript server side langauges cannot open up new windows Quote If you make it idiot proof, they'll build a better idiot :-)
Moderators Robby Posted April 5, 2004 Moderators Posted April 5, 2004 You need to use Javascript to open a new window Quote Visit...Bassic Software
mike55 Posted April 5, 2004 Author Posted April 5, 2004 Anyone got some code that will do it??? Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
MorningZ Posted April 5, 2004 Posted April 5, 2004 Anyone got some code that will do it??? i cant speak for everyone coding style, but i add the js into the <body> tag so i have on the aspx page <body id="bTag" runat="server"> and in the code, i can add attributes to it: bTag.Attributes.Add("onLoad","window.open('page2.aspx');") that's how i'd do it Quote If you make it idiot proof, they'll build a better idiot :-)
Arch4ngel Posted April 5, 2004 Posted April 5, 2004 Thanks for the way of doing it, even if I didn't asked. Wasn't informed that you could call a window open from the server(well... you know what I want to say... inserting javascript from the server to open a window). Thanx Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Moderators Robby Posted April 5, 2004 Moderators Posted April 5, 2004 Arch4ngel, yes you can insert the JS from your server code but the execution must still be from a client side event for example OnClick of a control, OnLoad of the Body etc.... Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.