Results 1 to 2 of 2

Thread: How to open a web page

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2005
    Location
    Christchurch, NZ
    Posts
    18

    Question How to open a web page

    Hi,

    I'm just starting to learn about ASP.Net Web forms in C#.

    I want to create an application where the user logs in on the front screen and on click of the login button (after validation of the login details) it will open a new web page.

    So fare I have created a new project that contains my login web page and my Main Menu web page.

    Can someone tell me what code I need to add to the On Click event of the login button that will open my main menu page.

    Thanks
    Roderick

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Re: How to open a web page

    Once you validate the user is authenticated, simply do:
    Code:
    Response.Redirect("Main.aspx");
    If you want to pop open a new window, then inside the click event do this:
    Code:
    Page.RegisterStartupScript("newwindow","<script>window.open('main.aspx','Main Menu','');</script>");
    Last edited by nemaroller; Apr 27th, 2005 at 09:32 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width