How to move Calendar in ASP.NET C# Web Forms?

Hemanth B 886 Reputation points
2021-06-22T06:58:43.803+00:00

Hi, I added a Calendar control to my webforms but the control is only staying at the left, I am not able to move it to the center. I found nothing on the web. Pls help! Even treeview, menu, gridview are not moving

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,506 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 118K Reputation points
    2021-06-22T08:20:19.617+00:00

    If you switch to Source view and add a <div> like this:

    <div style="margin-top: 100pt; margin-left: 200pt">
       <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
    </div>
    

    then the calendar will be moved. You can then switch to Design view and adjust the margins using the mouse.

    It is also possible to use <asp:Panel> or <table> elements, or Format>Position menu, or other techniques. However, I am not sure that you read answers.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.