Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 January 19th, 2004, 01:15 PM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default JavaScriptProblem

Hi
I have a linkbutton on page.
When a user click on the button in click event i have this:

Private Sub lnkAddLink_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lnkAddLink.Click
    Dim strScript As String
    strScript = "<script>window.open('AddHelpDeskTicket.aspx? dl=TextBox1&ID=" + btnUpdate.ToolTip.ToString.Substring(18)+ "','cal','width=300,height=600,left=270,top=10 0')"
        strScript += "</" + "script>"
        RegisterClientScriptBlock("EndUser", strScript)
End Sub

This work fine and i open another page where user enter some text in text box and click the button.

In the load event of another page i have this:

If Not IsPostBack Then
    TEXTBOX.value = Request.QueryString("textbox")
    IDOP.Value = Request.QueryString("ID")

End If

When the user click the buttno on the other page i have this:

     Dim strSQL As String
     Dim clsSQL As New SQL
     Dim lnkB As String
     lnkB = "something"

     strSQL = "UPDATE OPOMBE SET PARTNER ='" & lnkB & "' " _
                & " WHERE KLJUC =" & IDOP.Value

     If clsSQL.InsertUpdateSql(ConfigurationSettings.AppSe ttings & "User ID =" & Session("sUserID") & ";password=" & Session("sGeslo"), strSQL) = False Then
          Response.Redirect("GlobalError.aspx")
     Else
     Dim strScript As String = "<script>window.opener.document.forms(0)." + TEXTBOX.Value + ".value = '"
     strScript += lnkB
     strScript += "';self.close()"
     strScript += "</" + "script>"
     RegisterClientScriptBlock("anything", strScript)

     End If

So, if the update was succseded i close the other page and in the TextBox1 in the first page will be entered lnkB.
This work OK.
But, now i need some code to be done when the other page is closed.
Actualy i want to rebind a datalist control on the fist page.
Is it posible and how?
Thanks a lot
Alex





Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScriptProblem acko ASP.NET 1.x and 2.0 Application Design 2 December 23rd, 2003 04:21 AM





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