<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=ASP.NET_Tutorial%2FCustom_Controls%2FPostBack</id>
		<title>ASP.NET Tutorial/Custom Controls/PostBack - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=ASP.NET_Tutorial%2FCustom_Controls%2FPostBack"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=ASP.NET_Tutorial/Custom_Controls/PostBack&amp;action=history"/>
		<updated>2026-04-29T15:57:28Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=ASP.NET_Tutorial/Custom_Controls/PostBack&amp;diff=3318&amp;oldid=prev</id>
		<title> в 15:30, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=ASP.NET_Tutorial/Custom_Controls/PostBack&amp;diff=3318&amp;oldid=prev"/>
				<updated>2010-05-26T15:30:57Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:30, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=ASP.NET_Tutorial/Custom_Controls/PostBack&amp;diff=3319&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=ASP.NET_Tutorial/Custom_Controls/PostBack&amp;diff=3319&amp;oldid=prev"/>
				<updated>2010-05-26T12:00:20Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Adding PostBack capabilities to a server control (C#)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Web.UI;&lt;br /&gt;
using System.Web.UI.WebControls;&lt;br /&gt;
namespace WebControlLibrary1&lt;br /&gt;
{&lt;br /&gt;
    [DefaultProperty(&amp;quot;Text&amp;quot;)]&lt;br /&gt;
    [ToolboxData(&amp;quot;&amp;lt;{0}:WebCustomControl3 runat=server&amp;gt;&amp;lt;/{0}:WebCustomControl3&amp;gt;&amp;quot;)]&lt;br /&gt;
    public class WebCustomControl3 : WebControl&lt;br /&gt;
    {&lt;br /&gt;
        protected override void Render(HtmlTextWriter output)&lt;br /&gt;
        {&lt;br /&gt;
            PostBackOptions p = new PostBackOptions(this);&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Onclick,&lt;br /&gt;
                Page.ClientScript.GetPostBackEventReference(p));&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Value, &amp;quot;My Button&amp;quot;);&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Name, this.ClientID);&lt;br /&gt;
            output.RenderBeginTag(HtmlTextWriterTag.Button);&lt;br /&gt;
            output.RenderEndTag();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Adding PostBack capabilities to a server control (VB)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Imports System.ruponentModel&lt;br /&gt;
Imports System.Web.UI&lt;br /&gt;
&amp;lt;DefaultProperty(&amp;quot;Text&amp;quot;)&amp;gt; _&lt;br /&gt;
&amp;lt;ToolboxData(&amp;quot;&amp;lt;{0}:WebCustomControl3 runat=server&amp;gt;&amp;lt;/{0}:WebCustomControl3&amp;gt;&amp;quot;)&amp;gt; _&lt;br /&gt;
Public Class WebCustomControl3&lt;br /&gt;
    Inherits System.Web.UI.WebControls.WebControl&lt;br /&gt;
    Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)&lt;br /&gt;
        Dim p As New PostBackOptions(Me)&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Onclick, _&lt;br /&gt;
            Page.ClientScript.GetPostBackEventReference(p))&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Value, &amp;quot;My Button&amp;quot;)&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Id, Me.ClientID)&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Name, Me.ClientID)&lt;br /&gt;
        output.RenderBeginTag(HtmlTextWriterTag.Button)&lt;br /&gt;
        output.RenderEndTag()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Handling postback events in a server control (C#)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Web.UI;&lt;br /&gt;
using System.Web.UI.WebControls;&lt;br /&gt;
namespace WebControlLibrary1&lt;br /&gt;
{&lt;br /&gt;
    [DefaultProperty(&amp;quot;Text&amp;quot;)]&lt;br /&gt;
    [ToolboxData(&amp;quot;&amp;lt;{0}:WebCustomControl3 runat=server&amp;gt;&amp;lt;/{0}:WebCustomControl3&amp;gt;&amp;quot;)]&lt;br /&gt;
    public class WebCustomControl3 : WebControl, IPostBackEventHandler&lt;br /&gt;
    {&lt;br /&gt;
        protected override void Render(HtmlTextWriter output)&lt;br /&gt;
        {&lt;br /&gt;
            PostBackOptions p = new PostBackOptions(this);&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Onclick,Page.ClientScript.GetPostBackEventReference(p));&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Value, &amp;quot;My Button&amp;quot;);&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);&lt;br /&gt;
            output.AddAttribute(HtmlTextWriterAttribute.Name, this.ClientID);&lt;br /&gt;
            output.RenderBeginTag(HtmlTextWriterTag.Button);&lt;br /&gt;
            output.RenderEndTag();&lt;br /&gt;
        }&lt;br /&gt;
        #region IPostBackEventHandler Members&lt;br /&gt;
        public event EventHandler Click;&lt;br /&gt;
        public virtual void OnClick(EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            if (Click != null)&lt;br /&gt;
            {&lt;br /&gt;
                Click(this, e);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        public void RaisePostBackEvent(string eventArgument)&lt;br /&gt;
        {&lt;br /&gt;
            OnClick(EventArgs.Empty);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Handling postback events in a server control (VB)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Imports System.ruponentModel&lt;br /&gt;
Imports System.Web.UI&lt;br /&gt;
&amp;lt;DefaultProperty(&amp;quot;Text&amp;quot;)&amp;gt; _&lt;br /&gt;
&amp;lt;ToolboxData(&amp;quot;&amp;lt;{0}:WebCustomControl3 runat=server&amp;gt;&amp;lt;/{0}:WebCustomControl3&amp;gt;&amp;quot;)&amp;gt; _&lt;br /&gt;
Public Class WebCustomControl3&lt;br /&gt;
    Inherits System.Web.UI.WebControls.WebControl&lt;br /&gt;
    Implements IPostBackEventHandler&lt;br /&gt;
    Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)&lt;br /&gt;
        Dim p As New PostBackOptions(Me)&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Onclick, _&lt;br /&gt;
            Page.ClientScript.GetPostBackEventReference(p))&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Value, &amp;quot;My Button&amp;quot;)&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Id, Me.ClientID)&lt;br /&gt;
        output.AddAttribute(HtmlTextWriterAttribute.Name, Me.ClientID)&lt;br /&gt;
        output.RenderBeginTag(HtmlTextWriterTag.Button)&lt;br /&gt;
        output.RenderEndTag()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Event Click()&lt;br /&gt;
    Public Sub OnClick(ByVal args As EventArgs)&lt;br /&gt;
        RaiseEvent Click()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent&lt;br /&gt;
        OnClick(EventArgs.Empty)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>