Results 1 to 7 of 7

Thread: how do i "close" the current window when clicking a button?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128

    Question how do i "close" the current window when clicking a button?

    how do i "close" the current window when clicking a button?

    ps. i am using code behind an aspx file (aspx.vb)

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    use client side javascript's window.close
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    how ?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    <input type="button" value="click Me" onclick="javascript: window.close;"/>
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    does this work for an "asp:button" ?

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    asp: button is for server side code. you need client side code.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    i also want to perform these when clicking the button

    Dim aw As New AppSettinsWriter()
    aw.SetValue("conSystemStatus.ConnectionString", "Data Source=" & txtDBServer.Text & ";Integrated Security=SSPI;Initial Catalog=SystemStatus")

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