제 폼에는 레이블과 버튼 컨트롤이 있습니다. 기본적으로 레이블이 표시됩니다. 사용자가 버튼을 클릭하면 레이블이 보이도록 false로 설정했습니다. 간단한 버튼의 경우 작동하지만 버튼에 updatePanel을 추가하면 이벤트가 시작되지만 레이블이 보이지 않게됩니다. false. 그냥 시도해보십시오. 왜 이런 일이 일어나고 있는지, 그리고 해결책이 무엇인지 말해 주실 수 있습니다.업데이트 패널에 대해 혼란스러워합니다.
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:fileupload ID="Fileupload1" runat="server"></asp:fileupload>
<asp:Label ID="Label1" runat="server" Text="Label" ></asp:Label>
<asp:UpdatePanel ID="up" runat ="server" >
<ContentTemplate >
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("hello");
Label1.Visible = false;
}