Narayana

Narayana

  • NA
  • 94
  • 14.8k

How select Default today date in textbox control?

Mar 14 2017 12:53 PM
Source code : 
<asp:TextBox ID="txtfrmDate" runat="server" Height="34px" type="date"
class="form-control" ></asp:TextBox>
 
C# code :
 
   txtfrmDate.text=convert.todatetime(DateTime.Now.ToString()).ToString("mm/dd/yyyy");
  or
 txtfrmDate.text=DateTime.Now.ToString("mm/dd/yyyy");
 
 
If i am running the website .It's not taking defaultly today date. 
 
 

Answers (17)