???? ???? ??? ????? ???? ???????? ????? ????? ?????? ???????

?????? ????????? ?????? ?????????
???? ???????: 893667 - ??? ???????? ???? ????? ????? ??? ???????.
???? "????? ???" ASP.NET

???? ???? ??? ????? ???? ???????? ????? ????? ?????? ???????

?????? ??? ?????? ??? ?????????? ??? ???? ???? ?????? ??????? ??? ???????? ???? ???? ? ??????? ???????? ???? ???? ???? ?????? ????? ??????? ?? ???????? ???????? ????? ?????. ????? ????? ???????? ????? Ask For It ??????? ??????????. ???? ????? ?????? ??? ??????? ?? ???? ??? ??????.
????? ???? | ?? ????

?? ??? ??????

????? ???

????! ??? ?? Parag ?? ??? ????? ??? ???? ?? ?????? ??? Microsoft ASP.NET ???? ?? ??? ????. ??? ??? ???????? ??? Microsoft ? ?????? ?? ????? ?? ??? ???????? ???????? ??? ??? ???????? ??? ?????? ???????? ?????? Microsoft. ????? ????? ????? ?????? ???????, ??? ?????? ??????? ??? ???? ??? ???????? ??? ????? ?????? ??????? ? ??? ???? ?????? ??? ????? ???? ??? ???????? ??? ????? ?????? ???????. ????? ???? ????? ??? ??? ???? ??? ?? ? ????? ?????? ??? ????? ??? ????? ?? ???? ???? ???? ASP.NET.

???? ???? ???

?? ?????? ??? ????? ??? ??????? ???????? ???????:
  • ?? ?? ????? ???? ???????? "?
  • ?? ?? ????? ?????? ??????? ?
  • ?? ?? ?????????? ???????? ??? ????? ?????? ???????? ?????? ?????? ??????? ?
??? ????? ????? ??? ?????? ???????? ???? ?????? ????? ?????? ??????? ??? ???? ?????? ??? ????? ?????? ???????.

?? ?? ????? ???? ???????? "?

???? ????? ???? ???????? ????? ?????? ??????? ? ?????? ?????? ????????? ?? ??????? ??? ???????? ???? ???????? ?????? HTML ?????? ???? ???. ??? ???? ????? ???? ????? ??????? ?????? ???????? ?????? ????????? ??? ??????? ??? ASP.NET. ?????? ???? "????? ???" ??? ????? ???? ???? ???? "????? ???". ?????? ??? ???? ?? ???????? ??? "????? ???" ??????? ???? ?????? ????? ???? ????? Microsoft (MSDN) ?????? ??? ?????:
????? ??? ????? "????? ???"
http://msdn2.microsoft.com/en-us/library/65tcbxz3(vs.71).aspx

????? ????????? ???????? ????? ???
http://msdn2.microsoft.com/en-us/library/015103yb(vs.71).aspx

????? ????? ???? ???? ????????

???? ???? ?????? ???? ???????? ?????? ???? ???? ?????? ?? ???? ?????? ???? ???????? ?????? ???? "????? ???" (.aspx). ???????? ?????? ?? ????? ???? ???? ?????? <html>? <body>? ? <form>????? ??? ???? "????? ???" ?????? ???? ???? ????????. ?????? ???? ???? ?????? ???? ??????? ???????:
  1. ???? ???? ?? ???? HTML ?? ????? ???? ??????? ?????? ?? ???? ?????? ????? ???? ?? ????? ??????? ???????.
    <script language="C#" runat="server">
       public void button1_Click(object sender, EventArgs e)
       {
          label1.Text = "Hello World!!!";
       }
    </script>
    
  2. ????? ????? ?????? ????? ???? ????????.
    <asp:Label id="label1" runat="server"/>
     <br><br>
    <asp:button id="button1" text="Hit" OnClick="button1_Click" runat="server" />
    

????? ??????? ???? ???? ?????? ?? ???? "????? ???"

  1. ????? ???? ????? "????? ???" (.aspx) ?? Microsoft Visual Studio .NET 2002 ?? Microsoft Visual Studio .NET 2003 Microsoft Visual Studio 2005 ?? ?? ???? ????.
  2. ?? ?????? ??????? @ ?????. ??? ???? ??????? ?????? ????????? ???????? ???????.
    <%@ Register TagPrefix="UC" TagName="TestControl" Src="test.ascx" %>
    ?????? ?????? ???? ???? ???????? ????? ????? ??? ???????? ?? ??? ??????.
  3. ???????? ???? ???? ???????? ?? ???? "????? ???" ?????? ???????? ???????? ??????? ??? ??????? @ ?????.
    <html>
        <body>
              <form runat="server">
                   <UC:TestControl id="Test1" runat="server"/>
              </form>
        </body>  
    </html>
    

????? ????? ???? ?? ???? ???? ???????? ???? ????? ?? ????????? ???????? ??? ??? ???? "????? ???"

?????? ?????? ????? ???? ?? ???? ???? ?????? ???? ?????? ?? ???? "????? ???" ???????? ??????? @ ?????. ??? ???? ???? ????? ???? ???? ???? ?????? ???? ???? ?? ?????? ??? ??????. ???? ??? ????? ?????? ????:
  1. ????? ???? "????? ???" ???? ?? Visual Studio.
  2. ???????? ??? ????????? ???????? ??? ?? ????? ??? ?????? "????? ???" ???.
  3. ?? ????? Page_Load ??? ?????? ??????? code.
    // Load the control by calling LoadControl on the page class.
    Control c1 = LoadControl("test.ascx");
                
    // Add the loaded control in the page controls collection.	
    Page.Controls.Add(c1);
    
    ?????? ????? ????? ???? ???? ?????? ???? ???? ?? ????? ????? ?? ???? ???? ??????.

    ????? ?? ?????????? ?? ?????? ????? ????? ???????:
    ????? ????? ???? ??? ???? "??? ?????" ???????
    http://msdn2.microsoft.com/en-us/library/kyt0fzt1(vs.71).aspx

    ???? ???? ????? ???? ??????
    http://msdn2.microsoft.com/en-us/library/aa719775(vs.71).aspx

    ????? ???? ??? ????? ? postbacks ????? ????? ?????? Mitchell ????
    http://aspnet.4guysfromrolla.com/articles/092904-1.aspx

????? ?????? ???? ???? ????????

??? ??? ???? ?? ???? ???? ?????? ???? ?? ???:
  • ???? ??? .ascx ?????? ?? ??? Src ?? ??????? @ ????? ???? ?????? ????? ?????? ??? ????? ?? ??? System.Web.UI.UserControl.
  • ?????? ?????? ?? ???? ???? ??????? ????? ?? ?????.
  • ??? ??? ?????? Visual Studio ? ?? ?? ??? ??????? ??? ? Visual Studio ?????? ????????? ?????? ??? ??? ????? ?????? ???????? ?? precompiled ????? ?????? ???? ????.
  • ???????? ??? ???? ???? ???????? ???? ?? ?????? ???? ????? ????? ??????? ?????? ??????? ??????? ??????? ? ????? ??? ??????? ?????? ????????? ???????? ??? ??? (. ascx.cs) ???????? ??? ????????? ???????? ??????? ???? ????? .ascx.

?? ?? ????? ?????? ??????? ?

????? ?????? ??????? ?? ?????? ????????? ???????? ???????? ????? ??? ?????? ??? ???? ?????? ????? ?? ???????? ??? HTML ?? XML? ??? ???? ???? ???? "????? ???" ?? ?????? ????.

????? ?????? ????? ???????? ????? ?????? ??????

?????? ???? ???? ???? ???? ??? ?? ?? ??? ????? ?????? ??? ????? ?? ??? System.Web.UI.Control ?? ?? ??? System.Web.UI.WebControls.WebControl:
  • ??? ?? ????? ?? System.Web.UI.Control ??? ???? ???? ???? ?????? ????? nonvisual. ??? ???? ??????? <meta><head>?? ????? nonvisual ???????.
  • ??? ?? ????? ?? System.Web.UI.WebControls.WebControl ??? ???? ???? ???? ?????? HTML ???? ???? ????? ????? ??? ???? ????????? ??????.
??? ??? ???? ?? ????? ????? ????? ?????? ???????? ??? ?? ?? ?????? ????? ?????? ??? ??? ????? ?? ??? ?????? ???????? ?????? ?????? ?????? ????????? ?????? ???.

?? brief ???? ????? ?????? ??????? ???????? ???? ????? ???? ?? ???? ?????? ???? ??????. ???? ??? WebControl ??????? ??? ????? ?????? ???????? ???? ????? ???? ??? ???? ????????? ??????. ??? ???? ??????? ????? ??????? ??? WebControl ?????? ?? ???? ?????? ???? ????? ??? ?????? ???????? ????????.

????? ????? ???? ???? ???? ???? ???? ?? System.Web.UI.Control ???????? Visual Studio

  1. ??? ????? Visual Studio.
  2. ????? ????? ????? ??? ? ?????? ??? ????? CustomServerControlsLib ??? ???? ???????.
  3. ????? ??? ???? ??? ??????? ??? ???? ??????? SimpleServerControl.cs.
  4. ?? ?????? ???? ????? ????? System.Web ?? ?????? ?????.
  5. ?????? ?? ??? ??? ??? ????? ?????? ??????? ??????? ?? ????? SimpleServerControl.cs.
    System
    System.Collections
    System.ComponentModel
    System.Data
    System.Web
    System.Web.SessionState
    System.Web.UI
    System.Web.UI.WebControls
    
  6. ??? ????? SimpleServerControls ?? ????? ???????? ??????.
    public class SimpleServerControl : Control
  7. ????? ????? ????? ????? ??????? ??? ??? ?????.
    protected override void Render(HtmlTextWriter writer) 
    {
    	 writer.Write("Hello World from custom control");
    }
    
    ?????? ????? ??? HtmlTextWriter ????? ??????? HTML ??? ???? ??. ????? ??????? ????? HtmlTextWriter ????? ???? ?????? ??? ??? ??????? HTTP ??? ??? ????? Response.Write.
  8. ????? ??????? ????? ?????. ???? ????? ?????? ????? DLL.
  9. ???? ?????? ?? ????? ????? ???? ????? ??? ASP.NET.
  10. ????? ???? "????? ???" ??? ???? ??????? ???? ?????? ??????.
  11. ????? ???? ??? ????? ????? ?? ?????? ????? ??????? ASP.NET.
  12. ????? ???? ???? ???? ??? ???? "????? ???".
    <%@ Register TagPrefix="CC " Namespace=" CustomServerControlsLib " Assembly="CustomServerControlsLib " %>
  13. ?????? ???? ?????? ?????? ??? ?????? "????? ???" ?? ????? ???? ????? ????? ?????? ?? ????????? ???????? ?? ???????? <form>.
    <form id="Form1" method="post" runat="server">
        <CC:SimpleServerControl id="ctlSimpleControl" runat="server">
        </CC:SimpleServerControl >
    </form>
    
    ?????? ?? ??? ???????? ???????? SimpleServerControl ?? ??? ??? ???? ?????? ???? ????? ?????.
  14. ?? ?????? ?????? "????? ???" ?? ???? ??????? ?? ???? ?????? ??????.
??? ?? ??? ?????? Visual Studio ????? ??? ????? ??????? ???????:
  1. ??? ?? ???? ????.
  2. ?? ?????? ??? ???? SimpleServerControl.cs ?? ????? ????????? ???????? ??? ?? ???? ?? ??????? ?? 1 ??? 14.
  3. ?? ???????? ????? ?????? ??????:
    c:\windows (winnt)\Microsoft.Net\Framework\v1.1.4322
  4. ?? ?????? ???? ??????? ?? ????? ??? ???? ????? SimpleServerControl.cs.
  5. ?? ?????? ????? ??????:
    csc /t:library/??????: CustomServerControlsLib. /r:System.Web.dll /r:System.dll SimpleServerControl.dll SimpleServerControl.cs
    ????? ?? ????????? ??? ?????? C# ??????? (csc.exe) ?? ?????? ???? MSDN ??????:
    http://msdn2.microsoft.com/en-us/library/1700bbwd(vs.71).aspx
  6. ?????? ???? ?????? ?????? ??? ?????? "????? ???" ?????? ??? ???:
    1. ????? ???? ??? ?????? wwwroot.
    2. ??? ????? ????? ????? ??????? ?????? ?? Microsoft (IIS) ???? ????? ???? ???? ????? ??? ?????.
    3. ????? ???? ??? ??? ?????? ??????.
    4. ??? ???? ?????? ?????? DLL ?? ???? ???.
    5. ??? ????? ?????? "????? ???" ???? ??? ???????? ?? ??????? ??????? ???? ?????? ??????.
    6. ????? ????? ?????? ?? "????? IIS.
????? ????? "???? ???? ???? ????" ? ?????? ????? ??? ????? ????? ???? ??? ??????? ??? ???? ?????? ??????.

????? ??? ????? ??? ???? ?????? ??????

???? ????? ?? ?????? ?????? ?? ????? ?? ???? ?? ??????? ???? ???? ??????? ????? ??????? ???? ?????? ?????? ??? ?????? "????? ???".

???? ?????? ?????? ??? ??? ????? ????? ???? ????? ?? ???? ?????? ?? ??? ???? ?? ?????? ??? ?? ???? ?? ????? ???? ??????:
  1. ???? SimpleServerControl.cs ?? ???? ??.
  2. ????? ????? ?? ??? SimpleServerControl. ????? ??????
    public class SimpleServerControl : Control
    {
       private int noOfTimes;
       public int NoOfTimes
       {
           get { return this.noOfTimes; }
           set { this.noOfTimes = value; }
       } 
       protected override void Render (HtmlTextWriter writer)
       {
         for (int i=0; i< NoOfTimes; i++)
         {
           write.Write("Hello World.."+"<BR>");
         } 
       }
    }
    
  3. ??????? ??????? ????? ?????? ??????.
  4. ???????? ???? ???? ???? ??? ???? "????? ???" ????? ????? ????? ??? ????? ???? ??????.
    <CC:SimpleServerControl id="ctlSimpleControl" NoOfTimes="5" runat="server"></CC:SimpleServerControl>
  5. ????? ?????? ???? ??????? "?????? ??????" ?? ???? ?????? ?????? ??? ???? ??? ?? ???? ?? ????? ???? ??????.

????? ????? ???? ??? ??????? ??? ???? ?????? ??????

????? ???????? ???? ??? ???????
???? ???? ?????? ?????? ?????? ?? ?????? ?????? ??? ?? ?????. ??? ???? ??? ??? ???? ??????? ???? ?????? ?? Visual Studio ?? ???? ??????? NoOfTimes ???? ????? ???????? ?? ?????? "?????" ??? ????? ???? ?????? ?????? ?? ??? ???????.

???? ??? ???? ????? ?????? ??????? ?????? ????? Visual Studio ? ??? ???? ????? ??? ?? ???? ??????? ???? ?? Visual Studio ???? ????. ???? ????? ???? ??? ?? ????? ????? ?? ???. ??? ????? Visual Studio ??? ???? ?????? ?????? ? ??????? ?? ??? ???? ????? ?? ??? ????? ??????? ?? ????? ??? ?? ????? ???? ???? ?????? ?????? ?? ??? ??????? ????? ????.

????? ?? ?????? ?? ????????? ??? ???? ?? ?????? ???? MSDN ??????:
http://msdn2.microsoft.com/en-us/library/Aa288059(VS.71).aspx
???? ????? ????? ?????? ???? ???? ??????? ??????:
  1. ???? SimpleServerControl.cs ?? ???? ??.
  2. ????? ??? ???????? ?????? ????? ????? ??? ???? ??????? DefaultPropertyToolboxData ? TagPrefixAttrbute. ??? ???? ?????? ????? ??? ????? ??? ??? ?????? ???????.
            [
    	// Specify the default property for the control.		
    	DefaultProperty("DefaultProperty"),
    	
    	// Specify the tag that is written to the aspx page when the
            // control is dragged from the Toolbox to the Design view. 
    	// However this tag is optional since the designer automatically 
    	// generates the default tag if it is not specified.		
    	ToolboxData("<{0}:ControlWithAttributes runat=\"server\">" +
    		"</{0}:ControlWithAttributes>")
    	]
    	public class ControlWithAttributes : Control
    	{
    		private string _defaultProperty;
    		public string DefaultProperty
    		{
    			get { return "This is a default property value"; }
    			set { this._defaultProperty = value; }
    		}
    
    		protected override void Render(HtmlTextWriter writer)
    		{
    			writer.Write("Default Property --> <B>" + 
    			DefaultProperty + "</B>");
    		}
             }
    
  3. ???? ????? ???? ???? TagPrefixAttrbute. ??? ??? ????? ??????? ???? ???? ????? ????? ??? ??? ???? ?????? ?? ???? ??????? ??? ??????. ????? ???? ?????? ?????? ????? ??? "cc1" ???? ???????. ?? ??? ????? TagPrefixAttrbute ?????? ??? ??? ???? ??????. ????? TagPrefixAttrbute ??? AssemblyInfo.cs ???? ????? ?????? ?? ????????? ???????? ??? ?? ?? ?????? ????? ?? ???????.
    [assembly:TagPrefix("ServerControlsLib ", "MyControl")]
    ?????? ??? ??? ???? ????? ?????? ???????? ??? ???????? ????? ??? ????? ??? AssemblyInfo.cs ??? ????? ?? ?????? ???? ????? ??? ???? ????? ?????? ?? ?? ?????? ????? ?????? ?????? ???? ??????:
    > csc /t:library/??????: /r /r:System.dll ServerControlsLib.dll: *.cs System.Web.dll

?? ?? ?????????? ???????? ??? ????? ?????? ???????? ?????? ?????? ??????? ?

????? ???? ???? ?????? ?? ????? ?????? ???????? ?????? ?????? ??????? ?????? ??????? ???? ????? ???? ????? ??? ?????????? ??????.
?? ??? ??????????? ??? ??????
??????????? ???? ???????????? ???? ????
???????? ?? ????? ????? ??????? ??????? ????

??? ?? ??????? ?????? (.ascx) ?? ????????? ???????? ?????? ???????

??? ????? ??? ???? ?????? ?????? ????????? ?? ???? ?? ????? ????, ???? ??????? "?" ????? ???????
????? ???? ???? ????????? ?? ??? ???? ?? ????? ????

??? ??? ?? ?????? ??? ??????? ?? ?? ????? ??????? ??????? ??????? ???????

????? ?????? ????? ??????? ???????? ??????? ????????
???????? ????? ???? ??????? ????? "????? ???" ??? ??????; well-suited ?????? ????????? ???? (RAD)????? ??????? ?????? ?? ????????? ???????? ???? ?? ???? ?? ??? ??????
???????????? ???? ?????? ??? ?????? ????? ???? ??? ????? ????, ??? ???? ??????? ??? ????? ???? ??????? ?????????????? ?????? ???? ??? ??????? ?????? ??????? ?????; ???? ????? ????????? ??? ????? ??? ??? ???? ??????? ??????? ?????? ???? ???? ???? ???? ?? ?????? ???????
??????? ????? ????? ??? ??????? ????? ???? ????? ??? ??????? ??? ?????? ????? ??? ?????? ?????????? ??????? ?? ??????? ??? ???? ?? ???? ???? ???? ?????? ???????? ???? ??? ????? ??????? ? ???? ?? ???? ??? ????? ?? ????? ???? ????????

?????? ??????

??? ???? ?????? ??? ??? ???? ?? ??????? ???????? ???? ?? ?????? ????? ????? ????? ?????? ???????.

????? ??????

??? ????? ??????? ??? ??? HTTP ???? ??????. ???? ?? ????? ???? ????? ?? ??????? ??? ?? ??? ? ??? ?????? ?? ??? ????? ???. ?????? ??? ???? ?? ??????? ASP ?????????? ??????? ???? ??? ??????? ???????. ???? ???? ????? ??? ????? ?????? ?? ????????? ????????. ????? ???? ASP.NET ???? ????? ???? ??? ???? ????? ????? ?????? ???? ??? ??? ?????. ????? ?? ????????? ??? ???? ????? "?" ????? ????? "??????" ? ?? ?????? ????? ??? MSDN ??????:
????? ??? "????? ???" ????? ??????
http://msdn2.microsoft.com/en-us/library/75x4ha6s(vs.71).aspx

???? ????? ASP.NET
http://msdn.microsoft.com/msdnmag/issues/03/02/cuttingedge/default.aspx

????? ??? ??? ?????? ??? ???????? ????? ?????
http://msdn2.microsoft.com/en-us/library/4yfdwycw(vs.71).aspx
?????? ???????? ???? ????? ?? ???? ???? ????
ViewStateExample.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text;

namespace ServerControlLib
{
	/// <summary>
	/// When a page framework reloads this control after postback, it   
        /// will restore the values which are in view state.
	/// This control can easily perform state management without 
        /// implementing our own logic for maintaining the state.
	/// </summary>
	public class ViewStateExample : WebControl
	{
		// Text to be displayed in Text box control.
		private string _text;
		
		/*
		 * This property needs to be populated before every 
                 * postback in order to 
		 * retain its value.
		*/ 
		public string Text
		{
			get { return (_text == null) ? "_text property is empty"  : _text; }
			set { _text = value; }
		}

		/*
		 * This property needs to be filled once and should be 
                 * available on the successive postbacks.
		*/ 
		public string TextInViewState
		{
			get
			{
				object o = ViewState["TextInViewState"];
				return (o == null) ? "View state is empty" : (string)o;
			}
			set { ViewState["TextInViewState"] = value; } 
		}

		/*
		 * Over-ridden method on WebControl base class which                   
                 * displays both of the property values 
		 * i.e. one stored in view state and other which is not 
                 * saved in view state.
		*/
		protected override void RenderContents(HtmlTextWriter writer)
		{
			writer.Write("Text Without View State = ");
			writer.Write(Text);
			writer.Write("<hr><br>");
			writer.Write("Text In View State = ");
			writer.Write(TextInViewState);
		}
	}
}
?????? ???????? ???? ?????? ?????? ??? ???? "????? ???"
ViewStateExampleDemo.aspx
<%@ Page Language="C#" %>
<%@ Register TagPrefix="CC" Namespace="ServerControlLib" Assembly = "ServerControlLib" %>

<html>
  <head>
    <script runat="server">
      void button1_Click(object sender, EventArgs e)
      {
          Control1.Text = textbox1.Text;
          Control1.TextInViewState = textbox2.Text;
      }
    </script>
  </head>
  <body>
    <form runat="server" ID="Form1">
      <br>
      Property Value Without View State: <asp:TextBox id="textbox1" 
        runat="server" />
      <br>
      Property Value with View State: <asp:TextBox id="textbox2" 
        runat="server" />

      <asp:Button text="Cause Postback" onClick="button1_Click" 
        id="button1" Runat="server" />

      Output from the ViewStateExample Control :
      <CC:ViewStateExample id="Control1" runat="server"/>
    </form>
  </body>
</html>

???????

?? ??? ?????? ??? ??????? ?? ?? ?????? ??? ????? ??? ?????? ???? ???? ???? ?? ????? ?????? ?? ??? WebControl.
????? ?????? ????? System.Web.UI.Control
?????? ??? ??????? ??? ?????? ????? ??? System.Web.UI.Control ?????? ????? ??? MSDN ??????:
????? Control.Render
http://msdn2.microsoft.com/en-us/library/system.web.ui.control.render(vs.71).aspx

????? Control.RenderControl
http://msdn2.microsoft.com/en-us/library/system.web.ui.control.rendercontrol(vs.71).aspx

????? Control.RenderChildren
http://msdn2.microsoft.com/en-us/library/system.web.ui.control.renderchildren(vs.71).aspx
????? ????? ???? ???? ??? ??????
????? ?? ???? ???? ???? ???? ???? ???? ?????? ?? ???? ????? ?????? ??????? ???? ??????. ???? ???? ???? ?????? ????? HtmlTextWriter ??? ????? ???? ???? ????? HTML ???? ????? ??? ???? ????????? ??????. ??? ????? ?????? ??? ????? RenderControl. ?????????? ??????? ??????? RenderControl ????? ?????. ??? ????????? ????? ????? ????? RenderChildren ??? ?????? ??????? ??? ????? ???? ????? ??? ?? ??? ?????? ??? ????? ????????. ??? ??? ??? ??????? ???? ???? ?????? ???????? ???????? ???????? ?? ?????? ??????. ???
public void RenderControl(HtmlTextWriter writer) 
{
    // Render method on that control will only be called if its visible property is true.
    if (Visible)
    {
        Render(writer);
    }
}

protected virtual void Render(HtmlTextWriter writer) 
{
    RenderChildren(writer);
}
protected virtual void RenderChildren(HtmlTextWriter writer) 
{
    foreach (Control c in Controls) 
    {
        c.RenderControl(writer);
    }
} 
????? ?????? ????? System.Web.UI.WebControl
?????? ??? ??????? ??? ?????? ????? ??? System.Web.UI.WebControl ?????? ????? ??? MSDN ??????:
????? WebControl.RenderBeginTag
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.renderbegintag(vs.71).aspx

????? WebControl.RenderContents
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.rendercontents(vs.71).aspx

????? WebControl.RenderEndTag
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.renderendtag(vs.71).aspx
????? ????? ??? WebControl ????
???? ?????? ????????? ???????? ?????? ????? ????? ???? ?????? ??????.
protected override void Render(HtmlTextWriter writer)
{
    RenderBeginTag(writer);
    RenderContents(writer);
    RenderEndTag(writer);
}
?? ????? ??? ????? ????? ????? ???? WebControl. ??? ??? ???? ?? ????? ??????? ???? ??? WebControl ????? ??? ????? ????? RenderContents. ??? ???? ??? ??? ?? ???? ???? ????? ????? ????? ??? ????? ????? RenderBeginTag ???????? ??? ????? RenderEndTag ?? ????? ???? ???? ???? ?? ???? ???????? ???????? ???????.

?????

??? ?? ???? ??? ????? ?????? ???????? ?????? ?????? ??????? ?? ASP.NET 1.0 ? ASP.NET 1.1. ???? ?? ??? ?????? ?????? ??? ?????????? ???????? ??? ? ????? ???????? ???? ????? ??????? ?????? ?????.

????? ??? ????? ????? ??. ??? ??????? ????? ?????? ??? ???????? ???????? ?????? ???? ????? ????? ???? ???????? ?????? ????? ???? ???? ??? ??? ??????? ????? ?????? ??????? ?? ???????? ??????.

?????? ??? ???? ?? ????????? ??? ????? ?????? ?????? ????? ??? MSDN ??????:
??????? ????? ???? ???? ???? ASP.NET
http://msdn2.microsoft.com/en-us/library/aa310918(vs.71).aspx

examination ????? ?? ????? ???? ????????
http://msdn2.microsoft.com/en-us/library/ms972975.aspx

????? ?????? templated ???? ASP.NET ???????? ??????
http://msdn2.microsoft.com/en-us/library/Aa478964.aspx

??????? ?? ????? ???? ASP.NET ??????
http://msdn2.microsoft.com/en-us/library/aa720049(vs.71).aspx

???? ???? ????? ???? ???? ????????
http://msdn2.microsoft.com/en-us/library/aa719735(vs.71).aspx

????? ????? ???? ASP.NET ??????
http://msdn2.microsoft.com/en-us/library/aa719973(vs.71).aspx

????? ????? ?????? ???????: ??????? ????????
http://msdn2.microsoft.com/en-us/library/aa720226(vs.71).aspx

????? ??? ??? ??????? ??? ????? ???? ASP.NET
http://msdn2.microsoft.com/en-us/library/Aa478960.aspx
????? ????? ?? ????? ??????? ??? ???????? ???? ???? ???????? ?? ???????? ????? ?? ?? ??????? ???????? ????? Ask For It.

???????

???? ???????: 893667 - ????? ??? ??????: 04/?? ??????/1428 - ??????: 1.8
????? ???
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
????? ??????: 
kbmt kbhowto kbasp KB893667 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????893667

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com