1
I am studying Aspnet and I can not use Updatepanel in any way, I have a webform in a nested masterpage this is the code:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/MasterPages/NestedMasterPage8Form.Master" AutoEventWireup="true" CodeBehind="Dashboard.aspx.cs" Inherits="WebApplication1._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
This is the test code of the click event:
Label3.Text = "Aspx";
I have tried several ways with the button inside Contenttemplate without indicating Triggers but even so the entire page updates when clicking the button, can give me a light on the use of Updatepanel ?
hello Jorge, I suggest you take a look at this example that can help you Working with Updatepanel. Now a tip: this technology is well outdated, today we basically use a call
ajax
and we update whatever it takes on the page, if it’s just for study, I suggest studying a more modern technology– Ricardo Pontual
thanks for the tip I will give a researched on the most current techniques.
– jorge rafael