Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2007, 09:23 AM
Authorized User
 
Join Date: Jun 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello and thank you,

I created a aspx page and on the page under the Data Tooolbox section, I added a form view control to display records from a db. Moreover, I noticed the that the command button I added to the page named finished and using the following code the closes without a warning when opened from another page, but when I right click on the FormView and select EditTemplate InsertItemTemplate it does not work. To correct the problem I used the following code :

<asp:LinkButton ID="btnTest" runat="server" Font-Bold="True" OnClientClick="window.open('Test.aspx')">Test</asp:LinkButton> within the OnClientClick of a LinkButton.


Test Page
------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
           FinishButton1.Attributes.Add("onclick", "window.opener = top; window.close();")
    End Sub

    Protected Sub FinishButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles FinishButton1.Click
                Response.Write("<script language='javascript'> { self.opener = top; self.close() }</script>")

    End Sub






Similar Threads
Thread Thread Starter Forum Replies Last Post
close window with out message box nutrino ASP.NET 1.0 and 1.1 Basics 2 December 6th, 2005 04:26 PM
window.close() failing to...well...close! mheathcote Javascript How-To 2 October 31st, 2005 03:02 PM
Programmatically close a message box 12th_Man VB How-To 3 June 25th, 2004 05:44 PM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM
How do i close pop-up window?: window.close () Burton HTML Code Clinic 2 September 8th, 2003 05:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.