# C1.Web.Mvc.Component

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Web_Mvc_Component" data-uid="C1.Web.Mvc.Component" class="text-break">Component Class
</h1>
  <div class="markdown level0 summary"><p>Defines the base class for C1 MVC components.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">Component</span></div>
      <div class="level2"><a class="xref" href="C1.Web.Mvc.Control.html">Control</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.web.ihtmlstring">IHtmlString</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Web.Mvc.html">C1.Web.Mvc</a></h6>
  <h6><strong>Assembly</strong>: C1.Web.Mvc.dll</h6>
  <h5 id="C1_Web_Mvc_Component_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class Component : IHtmlString</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public MustInherit Class Component
    Implements IHtmlString</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Web_Mvc_Component__ctor_System_Web_Mvc_HtmlHelper_" data-uid="C1.Web.Mvc.Component.#ctor(System.Web.Mvc.HtmlHelper)">
          <a class="xref" href="C1.Web.Mvc.Component.-ctor.html#C1_Web_Mvc_Component__ctor_System_Web_Mvc_HtmlHelper_">Component(HtmlHelper)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates one <a class="xref" href="C1.Web.Mvc.Component.html">Component</a> instance.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Web_Mvc_Component_ChildComponentsCreated" data-uid="C1.Web.Mvc.Component.ChildComponentsCreated">
          <a class="xref" href="C1.Web.Mvc.Component.ChildComponentsCreated.html#C1_Web_Mvc_Component_ChildComponentsCreated">ChildComponentsCreated</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a boolean value indicates whether child components are created.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_ClientComponent" data-uid="C1.Web.Mvc.Component.ClientComponent">
          <a class="xref" href="C1.Web.Mvc.Component.ClientComponent.html#C1_Web_Mvc_Component_ClientComponent">ClientComponent</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value which represents the client control constructor with the complete namespace.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_Components" data-uid="C1.Web.Mvc.Component.Components">
          <a class="xref" href="C1.Web.Mvc.Component.Components.html#C1_Web_Mvc_Component_Components">Components</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the child components.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_HasScripts" data-uid="C1.Web.Mvc.Component.HasScripts">
          <a class="xref" href="C1.Web.Mvc.Component.HasScripts.html#C1_Web_Mvc_Component_HasScripts">HasScripts</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a boolean value indicates whether current component has the scripts which need to be rendered.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_Id" data-uid="C1.Web.Mvc.Component.Id">
          <a class="xref" href="C1.Web.Mvc.Component.Id.html#C1_Web_Mvc_Component_Id">Id</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the component id.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_UrlHelper" data-uid="C1.Web.Mvc.Component.UrlHelper">
          <a class="xref" href="C1.Web.Mvc.Component.UrlHelper.html#C1_Web_Mvc_Component_UrlHelper">UrlHelper</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the url helper.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Web_Mvc_Component_CreateChildComponents" data-uid="C1.Web.Mvc.Component.CreateChildComponents">
          <a class="xref" href="C1.Web.Mvc.Component.CreateChildComponents.html#C1_Web_Mvc_Component_CreateChildComponents">CreateChildComponents()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates child components.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_EnsureChildComponents" data-uid="C1.Web.Mvc.Component.EnsureChildComponents">
          <a class="xref" href="C1.Web.Mvc.Component.EnsureChildComponents.html#C1_Web_Mvc_Component_EnsureChildComponents">EnsureChildComponents()</a>
        </td>
        <td class="markdown level1 summary"><p>Ensure the child components created.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_OnPreRender" data-uid="C1.Web.Mvc.Component.OnPreRender">
          <a class="xref" href="C1.Web.Mvc.Component.OnPreRender.html#C1_Web_Mvc_Component_OnPreRender">OnPreRender()</a>
        </td>
        <td class="markdown level1 summary"><p>This method is performed before rendering.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_RegisterStartupScript_System_Web_UI_HtmlTextWriter_" data-uid="C1.Web.Mvc.Component.RegisterStartupScript(System.Web.UI.HtmlTextWriter)">
          <a class="xref" href="C1.Web.Mvc.Component.RegisterStartupScript.html#C1_Web_Mvc_Component_RegisterStartupScript_System_Web_UI_HtmlTextWriter_">RegisterStartupScript(HtmlTextWriter)</a>
        </td>
        <td class="markdown level1 summary"><p>Registers the start-up script.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_Render_System_Web_UI_HtmlTextWriter_" data-uid="C1.Web.Mvc.Component.Render(System.Web.UI.HtmlTextWriter)">
          <a class="xref" href="C1.Web.Mvc.Component.Render.html#C1_Web_Mvc_Component_Render_System_Web_UI_HtmlTextWriter_">Render(HtmlTextWriter)</a>
        </td>
        <td class="markdown level1 summary"><p>Render the component result to the writer.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_RenderScripts_System_Web_UI_HtmlTextWriter_System_Boolean_" data-uid="C1.Web.Mvc.Component.RenderScripts(System.Web.UI.HtmlTextWriter,System.Boolean)">
          <a class="xref" href="C1.Web.Mvc.Component.RenderScripts.html#C1_Web_Mvc_Component_RenderScripts_System_Web_UI_HtmlTextWriter_System_Boolean_">RenderScripts(HtmlTextWriter, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Render the scripts.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_SerializeOptions" data-uid="C1.Web.Mvc.Component.SerializeOptions">
          <a class="xref" href="C1.Web.Mvc.Component.SerializeOptions.html#C1_Web_Mvc_Component_SerializeOptions">SerializeOptions()</a>
        </td>
        <td class="markdown level1 summary"><p>Serialize the control to a Json string.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Component_ToHtmlString" data-uid="C1.Web.Mvc.Component.ToHtmlString">
          <a class="xref" href="C1.Web.Mvc.Component.ToHtmlString.html#C1_Web_Mvc_Component_ToHtmlString">ToHtmlString()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns an HTML-encoded string.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="C1.Web.Mvc.Fluent.IHtmlStringExtension.ToTemplate.html#C1_Web_Mvc_Fluent_IHtmlStringExtension_ToTemplate_System_Web_IHtmlString_">IHtmlStringExtension.ToTemplate(IHtmlString)</a>
  </div>

</div>
