How to set html input type text value using ASP.NET C#?

前端 未结 5 1440
难免孤独
难免孤独 2021-02-04 18:31

I have an html control which I want to set its value .... here\'s the control:



        
5条回答
  •  半阙折子戏
    2021-02-04 19:00

    
      
    
    

    Code Behind :

    protected string tdate { get; set; }
    
     protected void Page_Load(object sender, EventArgs e)
        {
           this.tdate = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString();
        }
    

提交回复
热议问题