:master: non so. Basta fare un semplice esempio per vedere che va![]()
pagina
codicecodice:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="prova.aspx.cs" Inherits="prove_prova" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <hr /> <asp:LinkButton ID="LinkButton1" runat="server" onclick="modificaLabel">Modifica label</asp:LinkButton> </div> </form> </body> </html>
codice:using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class prove_prova : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void modificaLabel(object sender, EventArgs e) { this.Label1.Text = "Label modificata"; } }

Rispondi quotando