ASP.net Update Panel - Refreshing Whole Page

Kbba04527
Kbba04527 used Ask the Experts™
on
Hi,

I have set up a very simple update panel page as I was getting a full postback each time on a new site I have set up in VWD, it refuses to update just the update panel, but if I copy over the page to the older site it works fine.

They have identical web configs and I'm not using a master page so no interference there.

Same on the live server, one work, one doesn't - any ideas?

Cheers
Karl
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi Karl,

Please check this article in case you are missing something: https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.updatepanel?view=netframework-4.8

And if not, then please post your page here as it is very difficult to guess what is going on here.

Regards,
Chinmay.

Author

Commented:
Hi,

Many thanks for coming back, I'll post the code below, but it seems to be an environment issue - the exact same page copied onto one project works and then not on the other, I have even copied the web.config and global files over

It's the same with the two live applications on the web server, but one is running under the other so there's no need for it to happen.

<%@ Page Language="VB" AutoEventWireup="false" ClientIDMode="AutoID" CodeFile="Default2.aspx.vb" Inherits="Default2" Debug="true" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
<form id="form1" runat="server">


<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel runat="server" ID="test2" ChildrenAsTriggers="true">
<Triggers>
     <asp:AsyncPostBackTrigger ControlID="time1" />
  </Triggers>
<ContentTemplate>
<asp:label runat="server" ID="time"></asp:label>
<asp:Button ID="time1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>



</form>
</body>
</html>

Open in new window


Partial Class Default2
    Inherits System.Web.UI.Page

    Private Sub Default2_Load(sender As Object, e As EventArgs) Handles Me.Load
        If IsPostBack Then
            Label1.Text = "Hello " & Date.Now
        End If
    End Sub

    Private Sub time1_Click(sender As Object, e As EventArgs) Handles time1.Click
        time.Text = Date.Now
    End Sub

End Class

Open in new window

Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi Karl,
Sorry for the delayed response.

but one is running under the other so there's no need for it to happen.

Do you mean to say one app is another app's child directory on your server?

Regards,
Chinmay.
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Author

Commented:
Hi,

I finally got to the solution, having these files in the BIN directory was causing it for some reason.

AspNet.ScriptManager.jQuery
AspNet.ScriptManager.jQuery.dll.refresh
Microsoft.ScriptManager.MSAjax.dll
Microsoft.ScriptManager.MSAjax.dll.refresh
Microsoft.ScriptManager.WebForms.dll
Microsoft.ScriptManager.WebForms.dll.refresh

Once removed worked fine.

Thank you again for your help.

Cheers
Karl
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi Karl,

Glad you found out the solution. You can mark your comment as an answer and close this question.

Regards,
Chinmay.
Hi,

I finally got to the solution, having these files in the BIN directory was causing it for some reason.

AspNet.ScriptManager.jQuery
AspNet.ScriptManager.jQuery.dll.refresh
Microsoft.ScriptManager.MSAjax.dll
Microsoft.ScriptManager.MSAjax.dll.refresh
Microsoft.ScriptManager.WebForms.dll
Microsoft.ScriptManager.WebForms.dll.refresh

Once removed worked fine.

Thank you again for your help.

Cheers
Karl

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial