Results 1 to 2 of 2

Thread: how to pop up a new window

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    michigan
    Posts
    70

    how to pop up a new window

    Hi I was just wondering how to pop up a new window in asp.net. I have searched from the database....and if it doesn't return any results than I want a new window to popup...How do we do this concept....thanks for ur help in advance...

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    It depends on what page event you want the window to pop up on...

    Let's say you have a button named Button1 and you want a new window to pop up when the button is clicked then your code would look like this:
    PHP Code:
    // C# code

    private void Page_Load(object senderSystem.EventArgs e)
            {


                
    // Put user code to initialize the page here
                
    string winURL "http://www.vbforums.com/";
                
    string features "height=600,width=800,resizable=yes";

                
    Button1.Attributes.Add("onclick""javascript:window.open('"
                    
    winURL "', null, '" features "');");

            } 

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