Creating new browser window

csharp United States
  • 18 years ago

    I must be missing something obvious... so be gentle...  here goes...


    I am working with Visual Studio .NET


    How do I create a new browser window in a C# web application?


    I have figured out how to do it with html/javascript... but I am apparently not smart enough to integrate this with my C# code... I would lke to do this if possible with C# and avoid hand-crafting the HTML code since I am pretty sure that the IDE will recreate the HTML code based upon the way the form is layed out. (right? wrong?)


    I would like to create a new window for the user to enter some info. I would like to do this via a button on the main page. If the user presses the button I would like to create a new browser window. This window will allow the user to enter data. If the user presses submit I will kick off a db update, close the new window and refresh the main page. If the user cancels, then I will close the window and return to the main page without dpupdate or main page refresh.


    Thanks in advance.

  • 18 years ago

    I don't know if it would be any different in a web app
    (as I've never done one), but usually I use:


    System.Diagnostics.Process.Start("IExplore.exe");


    to open a new browser. You can also do this:


    System.Diagnostics.Process.Start("IExplore.exe","http://www.developerfusion.com");


    Hope that helps,
    - Mike

  • 18 years ago

    OK... I finally figured it out...


    I was using a server side control (a button from the Web Forms Toolbox) instead of a client side button (button from the HTML Toolbox).


    In the words of the immortal Homer Simpson... Doohhh!


    Anyway... thanks for the help.


Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Every language has an optimization operator. In C++ that operator is ‘//’”