INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

AsyncPostBackTrigger doesn't work in production

AsyncPostBackTrigger doesn't work in production

(OP)
First thing.  The UpdatePanel works flawlessly within the VS 2010 IDE, so trying to fix the problem on the actual website is really tough.  I have added a table update within the button click event.  I get two events in the IDE but only one in production.  What's supposed to happen is a from and to address range is sent to a <directions> and the resulting route is supposed to display on the screen.

We are moving our website from server-a to server-b so getting this to work is extremely important.

Here's some details:

First the markup
<asp:UpdatePanel ID="UpdatePanel1" runat="server" updatemode="Always">
   <Triggers>
      <asp:AsyncPostBackTrigger controlid="UpdateButton1"/>
   </Triggers>

   <ContentTemplate>
      <artem:GoogleMap ID          = "GoogleMap2"
                       runat       = "server"
                       Width       = "300px"
                       Height      = "300px"
                       Latitude    = "39.952335"
                       Longitude   = "-75.163789"
                       Zoom        = "4"
                       BorderStyle = "Solid"
                       BorderColor = "#999999"
                       BorderWidth = "1">
         <Directions>
         <artem:GoogleDirection RoutePanelId="route" Query="" />
         </Directions>
         </artem:GoogleMap>
         <div id="route">
         <br />
                        
         <asp:Button id                = "UpdateButton1"
                     runat             = "server"
                     causesvalidation  = "false"
                     onclick           = "UpdateButton_Click"
                     text              = "Get Directions" />
      </ContentTemplate>

   </asp:UpdatePanel>

Here's the code behind for the button click:
Protected Sub UpdateButton_Click(ByVal sender As Object, _
                                 ByVal e As System.EventArgs) _
                                       Handles UpdateButton1.Click
   Dim StartAdd As TextBox = FindControlRecursive(DetailsView1, "TextBox2")
   Dim EndAdd   As TextBox = FindControlRecursive(DetailsView1, "TextBox3")
   Dim query    As String  = "from: " & StartAdd.Text & " to: " & EndAdd.Text

   '
   ' for debug...
   '
   Dim oLogError As New LogError(Server.GetLastError, Request)
   oLogError.LogToDatabase ( "Getting Directions", query )

   Me.GoogleMap2.Directions.Item(0).Query = query
End Sub

I've tried several things but nothing changes.  Originally the updatemode was Conditional, but I found a suggestion on another forum to change it to Always.  Another forum suggested adding 'Async="true"' at the top of the .aspx file.  It always works in the IDE and never on the website.  I should add that there is a copy of the website on another server that is using old code that I didn't create and it works fine.  I originally copyied that entire website over to the new server but had a problem with Googlemap Api Key.  I resolved that by deleting and re-adding the UpdatePanel (don't know why that worked).

Thanks in advance,

Jerry Scannell
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close