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
|