locked
Col-md RRS feed

  • Question

  • User219039814 posted
    How can i set col-md dynamically..i.e in code behind
    Wednesday, June 13, 2018 12:23 PM

All replies

  • User1577371250 posted

    You can set the class using jQuery

    <div class="" id="myDiv">
    </div>
    
    <script>
    $("#myDiv").addClass("col-md-12"); </script>

    Wednesday, June 13, 2018 8:11 PM
  • User-37275327 posted
    <div class="" id="myDiv" runat="server">
    </div>
    

    On code behind

    myDiv.CssClass = "Col-md";

    Thursday, June 14, 2018 5:44 AM
  • User1724605321 posted

    Hi vijaylakshmi,

    vijaylakshmi

    How can i set col-md dynamically..i.e in code behind

    If there is a server side function to  determine the value of col-md . You can also use ajax to call server side function :

    http://www.dotnetodyssey.com/2015/01/02/calling-asp-net-code-behind-using-jquery-ajax-simple-complete-example/ 

    And modify the CSS of element in success callback function of Ajax.

    Best Regards,

    Nan Yu

    Thursday, June 14, 2018 7:14 AM