# C1.Win.Editor.C1Editor.RemoveElementAsync

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Editor_C1Editor_RemoveElementAsync_" data-uid="C1.Win.Editor.C1Editor.RemoveElementAsync*">RemoveElementAsync Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Editor_C1Editor_RemoveElementAsync_" data-uid="C1.Win.Editor.C1Editor.RemoveElementAsync*"></a>
<h4 id="C1_Win_Editor_C1Editor_RemoveElementAsync_System_String_System_String_System_String_System_Boolean_" data-uid="C1.Win.Editor.C1Editor.RemoveElementAsync(System.String,System.String,System.String,System.Boolean)">RemoveElementAsync(string, string, string, bool)</h4>
<div class="markdown level1 summary"><p>Removes element by its ID, tag and/or class name asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Task RemoveElementAsync(string elementId, string tag = null, string className = null, bool removeChildren = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function RemoveElementAsync(elementId As String, Optional tag As String = Nothing, Optional className As String = Nothing, Optional removeChildren As Boolean = True) As Task</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 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_Editor_C1Editor_RemoveElementAsync_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>
