Adding placeholder for Textbox in ASP.NET
To add a hint inside your TextBox in ASP.Net, you can easily use the "placeholder " keyword attribute as below
<asp:TextBox CssClass="form-control" ID="txt_Name" placeholder="your hint" runat="server"></asp:TextBox>
Adding placeholder for Textbox at Code-Behind in ASP.NET
In code-behind, you can set a placeholder for a TextBox using C# as the following:
Method 1
txt_Name.Attributes.Add("placeholder", "your hint");
Method 2
txt_Name.Attributes["placeholder"] = "your hint";