Hi gokuldas,
Please refer below code and correct your code.
HTML
<div>
<asp:Label ID="lblDate" runat="server" />
</div>
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
DateTime date = DateTime.Now;
string monthYear = date.ToString("MM/yyyy");
lblDate.Text = monthYear;
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim date1 As DateTime = DateTime.Now
Dim monthYear As String = date1.ToString("MM/yyyy")
lblDate.Text = monthYear
End Sub
Output
07/2018