Forum Moderators: open

Message Too Old, No Replies

How do I open a new window and remove the toolbars

using C#

         

Red_Eye

1:51 pm on Jul 15, 2003 (gmt 0)

10+ Year Member



I am building a web application. once the users has entered the correct login details the application is opened in a new window with the toolbars removed. My reason for doing this is that I want to control the way the users interfaces with the application.

I know how to open a new window using Javascript and remove toolbars. However I need to do this by clicking an ASP:Button is there a way of running some javascripts from a C# command.

Thanks in advance.

cshelby

9:34 pm on Jul 15, 2003 (gmt 0)

10+ Year Member



Red_Eye,
There is a way to run JavaScript from a server control; you can do it one of two ways.
1. in the click event of the Button Webcontrol register a script code block (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuipageclassregisterclientscriptblocktopic.asp or search the sdk for RegisterClientScriptBlock).

OR

2. add an attribute to your button webcontrol (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolswebcontrolclassattributestopic.asp or search the sdk for WebControl.Attributes).

Either way works just fine. IMHO, I think #2 is easier, but you can decide for yourself.

Chris

Red_Eye

7:52 am on Jul 16, 2003 (gmt 0)

10+ Year Member



Thanks cshelby, that should do the trick