Sometimes we have requirements such a way that we need to change the elements and accordingly style dynamically under div.
Suppose in one case we need our div to be of width-size 800px and and can scroll if goes beyond.
for that on the front-end side (aspx) create <div id=”dvDStyle” runat=”server”> </div>
then in code-behind ( cs file) mention style using either of the way
1st one is mention it as Attribute for dvDStyle
2nd is mention style as separate property like Key,Value pair.
dvDStyle.Attributes.Add(“style”, “width:800px; overflow:scroll;”);
dvDStyle.Style[“width”] = “800px”;