title: Random sequence of html div tags position
body: <p>There is four Div tags in this GridView with <code>ID="NUMBER1"</code> <code>ID="NUMBER2"</code> <code>ID="NUMBER3"</code> <code>ID="NUMBER4"</code> values and i want to change the sequence of their position in page randomly in every row of the gridview. 
  what is the best and most simple SERVER SIDE method to do this.
  I'm new to asp.net using C# language.</p>
  
  <pre><code>&lt;body&gt;
      &lt;asp:GridView OnRowCommand="SelectedPollGridView_RowCommand" ID="SelectedPollGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="QuesID" DataSourceID="SelectedPollSqlDataSource"&gt;
          &lt;Columns&gt;
              &lt;asp:TemplateField HeaderText="Questions"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;div runat="server" id="MainDiv" class="text-right col-md-12"&gt;
                          &lt;div class="row "&gt;
                              &lt;div dir="rtl" class="col-md-12 text-right"&gt;
                                  &lt;p runat="server" id="BodyPTag"&gt;&lt;%#Eval("Body") %&gt;&lt;/p&gt;
                                  &lt;asp:Label Visible="false" ID="QuesIDLabel" runat="server" Text='&lt;%#Eval("QuesID") %&gt;'&gt;&lt;/asp:Label&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div id="NUMBER1" runat="server" class="row "&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div dir="rtl" runat="server" id="Div2" class="text-right col-md-11"&gt;
                                      &lt;asp:Label ID="Label1" runat="server" Text='&lt;%#Eval("O1") %&gt;'&gt;&lt;/asp:Label&gt;
                                  &lt;/div&gt;
                                  &lt;div runat="server" id="Div3" class="text-right col-md-1"&gt;
                                      &lt;asp:Button CommandArgument='&lt;%# ((GridViewRow) Container).RowIndex %&gt;' CommandName="O1" CssClass='&lt;%#Eval("O1Css") %&gt;' ID="O1Button" runat="server" Text="Option 1" /&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div id="NUMBER2" runat="server" class="row "&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div dir="rtl" runat="server" id="Div4" class="text-right col-md-11"&gt;
                                      &lt;asp:Label ID="Label2" runat="server" Text='&lt;%#Eval("O2") %&gt;'&gt;&lt;/asp:Label&gt;
                                  &lt;/div&gt;
                                  &lt;div runat="server" id="Div5" class="text-right col-md-1"&gt;
                                      &lt;asp:Button CommandArgument='&lt;%# ((GridViewRow) Container).RowIndex %&gt;' CommandName="O2" CssClass='&lt;%#Eval("O2Css") %&gt;' ID="O2Button" runat="server" Text="Option 2" /&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div id="NUMBER3" runat="server" class="row "&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div dir="rtl" runat="server" id="Div6" class="text-right col-md-11"&gt;
                                      &lt;asp:Label ID="Label3" runat="server" Text='&lt;%#Eval("O3") %&gt;'&gt;&lt;/asp:Label&gt;
                                  &lt;/div&gt;
                                  &lt;div runat="server" id="Div7" class="text-right col-md-1"&gt;
                                      &lt;asp:Button CommandArgument='&lt;%# ((GridViewRow) Container).RowIndex %&gt;' CommandName="O3" CssClass='&lt;%#Eval("O3Css") %&gt;' ID="O3Button" runat="server" Text="Option 3" /&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div  id="NUMBER4" runat="server" class="row "&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div dir="rtl" runat="server" id="Div8" class="text-right col-md-11"&gt;
                                      &lt;asp:Label ID="Label4" runat="server" Text='&lt;%#Eval("O4") %&gt;'&gt;&lt;/asp:Label&gt;
                                  &lt;/div&gt;
                                  &lt;div runat="server" id="Div9" class="text-right col-md-1"&gt;
                                      &lt;asp:Button CommandArgument='&lt;%# ((GridViewRow) Container).RowIndex %&gt;' CommandName="O4" CssClass='&lt;%#Eval("O4Css") %&gt;' ID="O4Button" runat="server" Text="Option 4" /&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
          &lt;/Columns&gt;
      &lt;/asp:GridView&gt;
      &lt;asp:SqlDataSource ID="SelectedPollSqlDataSource" runat="server" ConnectionString="&lt;%$ ConnectionStrings:GUOTSConnectionString %&gt;" SelectCommand="SELECT DISTINCT QuesID, Body, O1, O2, O4, O3, O1Css, O2Css, O4Css, O3Css, Time, BookRange, UserID, CourseID, Code FROM Question WHERE (UserID = @userid) AND (Code = @code)"&gt;
          &lt;SelectParameters&gt;
              &lt;asp:QueryStringParameter Name="code" QueryStringField="code" /&gt;
              &lt;asp:SessionParameter Name="userid" SessionField="userid" /&gt;
          &lt;/SelectParameters&gt;
      &lt;/asp:SqlDataSource&gt;
  &lt;/body&gt;
  </code></pre>