I add Body Control with MasterFormClass.cs
protected override void OnInit(EventArgs e)
{
HtmlGenericControl NewControl = new HtmlGenericControl("div");
NewControl.ID = "LoadingSpinImage";
NewControl.Attributes.Add("style", "background-image: url('../../common/images/477.gif'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; width: 100%; height: 98%; position: absolute; top: 1px; background-color: rgba(255,255,255,0.6);");
this.Form.Controls.Add(NewControl);
base.OnInit(e);
}
Result:
<html>
<body>
.... all control or element
.... all control or element
.... all control or element
<div id="LoadingSpinImage" style="width: 100%; height: 98%; position: absolute; top: 1px; background-image: url('http://preloaders.net/preloaders/495/Spinning%20segments.gif'); background-attachment: fixed; background-color: rgba(255, 255, 255, 0.6); background-position: 50% 50%; background-repeat: no-repeat;"></div>
</body>
</html>
But... It adds to the bottom of the page. I want to add just below the body.
This must be the result I wanted :
<html>
<body>
<div id="LoadingSpinImage" style="width: 100%; height: 98%; position: absolute; top: 1px; background-image: url('http://preloaders.net/preloaders/495/Spinning%20segments.gif'); background-attachment: fixed; background-color: rgba(255, 255, 255, 0.6); background-position: 50% 50%; background-repeat: no-repeat;"></div>
.... all control or element
.... all control or element
.... all control or element
</body>
</html>