Tested UpdatePanel run.
Default.aspx:
---------------------------------------------------------------------------------------------------------------------------------------------------------------
<%@ Page Language="C#" Inherits="monoTest.Default" CodeBehind="Default.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head runat="server">
<title>Default</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel id="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger runat="server" ControlID="button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:Button id="button1" runat="server" Text="Click me!" OnClick="button1Clicked" />
</form>
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------------------------
Default.aspx.cs:
-------------------------------------------------------------------------
using System;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Net;
namespace monoTest
{
public partial class Default : System.Web.UI.Page
{
public virtual void button1Clicked (object sender, EventArgs args)
{
TextBox box=TextBox1;
if(box.Text=="aaaaa")
{
box.Text="bbbbb";
}
else
{
box.Text="aaaaa";
}
}
}
}
---------------------------------------------------------------------