日期:2014-05-20 浏览次数:20869 次
<%@ Master Language= "C# " AutoEventWireup= "true " CodeFile= "MasterPage.master.cs " Inherits= "a_MasterPage " %> <!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> <div> <asp:contentplaceholder id= "ContentPlaceHolder1 " runat= "server "> </asp:contentplaceholder> </div> </body> </html>
<%@ Page Language= "C# " MasterPageFile= "MasterPage.master " AutoEventWireup= "true " CodeFile= "1.aspx.cs " Inherits= "a_1 " Title= "Untitled Page " %> <asp:Content ID= "Content1 " ContentPlaceHolderID= "ContentPlaceHolder1 " Runat= "Server "> <form id= "form1 " runat= "server "> <atlas:ScriptManager ID= "ScriptManager1 " runat= "server " EnablePartialRendering=true /> <atlas:UpdatePanel runat= "server " ID= "UpdatePanel1 " Mode= "Conditional "> <ContentTemplate> <asp:Label ID= "PartialPostBackLabel " runat= "server " /> <asp:Button ID= "PartialPostBackButton " runat= "server " Text= "页面 部分进行回发 " OnClick= "PartialPostBackButton_OnClick " /> </ContentTemplate> </atlas:UpdatePanel> </form> </asp:Content>
using System; using System.Data; 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; public partial class a_1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void PartialPostBackButton_OnClick(object sender, EventArgs e) { PartialPostBackLabel.Text = DateTime.Now.ToString(); } }