question

HemanthB-9452 avatar image
0 Votes"
HemanthB-9452 asked Viorel-1 edited

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

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

dotnet-aspnet-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Viorel-1 avatar image
0 Votes"
Viorel-1 answered Viorel-1 edited

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.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.