Below is the code for retrieving last day (max days) in a month.
System.DateTime.DaysInMonth(int year, int month)
Happy coding…
Below is the code for retrieving last day (max days) in a month.
System.DateTime.DaysInMonth(int year, int month)
Happy coding…
Have you ever needed to create a vertical text? Something like:
It is very simple and straight forward. We can use CSS to achieve that, the only issue we have to consider is compatibility.
Code
Let's start creating a simple div with a class ("VerticalText" for our example):
<div class="VerticalText">Sample Text</div>
<style type="text/css">
.VerticalText {
color: green;
writing-mode:tb-rl;
filter: flipv fliph;
-webkit-transform:rotate(270deg);
-moz-transform:rotate(270deg);
-o-transform: rotate(270deg);
white-space:nowrap;
width:60px; font-family: calibri;
font-size:20pt;
font-weight:bold;
}
</style>
For Internet Explorer we change the writing mode to top to bottom, right to left, then we flip it vertically and horizontally.
For Webkit, Mozilla and Opera, we use transform and rotate (270deg).
The result will work in Opera 10.5+, IE6+, FF and Webkit based browsers.
Happy coding…