# C1.Win.Editor.C1Editor.RemoveElement

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Editor_C1Editor_RemoveElement_" data-uid="C1.Win.Editor.C1Editor.RemoveElement*">RemoveElement Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Editor_C1Editor_RemoveElement_" data-uid="C1.Win.Editor.C1Editor.RemoveElement*"></a>
<h4 id="C1_Win_Editor_C1Editor_RemoveElement_System_String_System_String_System_String_System_Boolean_" data-uid="C1.Win.Editor.C1Editor.RemoveElement(System.String,System.String,System.String,System.Boolean)">RemoveElement(string, string, string, bool)</h4>
<div class="markdown level1 summary"><p>Removes element by its ID, tag and/or class name.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;This method is deprecated, please, use RemoveElementAsync instead.&quot;)]
public void RemoveElement(string elementId, string tag = null, string className = null, bool removeChildren = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;This method is deprecated, please, use RemoveElementAsync instead.&quot;)&gt;
Public Sub RemoveElement(elementId As String, Optional tag As String = Nothing, Optional className As String = Nothing, Optional removeChildren As Boolean = True)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">elementId</span></td>
      <td><p>Element ID to remove.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">tag</span></td>
      <td><p>Tag name to remove.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">className</span></td>
      <td><p>Class name of the elements to remove.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">removeChildren</span></td>
      <td><p>Determines whether child elements should also be removed.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_Editor_C1Editor_RemoveElement_System_String_System_String_System_String_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Body cannot be removed. Instead, it will be cleared.</p>
</div>
</div>
