title: Asp .Net Razor View table default sort order with Bootstrap
body: <p>In asp.net-core controller I sort descending model collection by BirthDate property and return it to the view. While debugging prepared order is respected, but before showing view table changes sort direction to ascending again.</p>
  
  <p>Is there a way to set default sort order from ascending to descending for table column just by applying Bootstrap classes in Razor view?</p>
  
  <pre><code>&lt;table id="table" class="table table-striped table-bordered" style="width:100%"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Birth date&lt;/th&gt;
                      &lt;th&gt;Name&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  @foreach (var person in Model)
                  {
                      &lt;tr&gt;
                          &lt;td&gt;@person.BirthDate&lt;/td&gt;
                          &lt;td&gt;@person.Name&lt;/td&gt;
  
                      &lt;/tr&gt;
                  }
              &lt;/tbody&gt;
          &lt;/table&gt;
  </code></pre>
  
  <p>What is the simplest way to accomplish that?</p>