Wednesday, October 9, 2019

How to Show Date Time In Asp.net Project


ASP.NET (Date and Time)

#Basic Info Before Making Project


1.Button- it is onclick event
Convert.tosingle - float
Convert.tostring – string

#Make New Project For Date Time in Asp.net

#Open Visual Studio 2017
  1.         File >New project >Visual C#  click on >web > asp.net  web app > empty
  2.         Then click on view > Solution explorer
  3.         Then right click on web application > add new item> web form
  4.         Click on Design
  5.        . Type anything and run in any browser


1. Push button
2. Link button
3. Image button
# Label control – read only
·        Click on view> toolbox> label
·       Add 2 label
Label.Text=”Anyname”; [save]
Label2.Text = DateTime.Now.ToString(); [for date]
public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Label2.Text = DateTime.Now.ToString();
            Label1.Text = 100.ToString();
        }

Label1.Text = 100.ToString();
            To convert integer into string


No comments:

Post a Comment