@Html.TextBox
@Html.TextBox("SiD", "Special ID here", new {@class="form-control"})What i should do to make the text "
Special ID here" clear on focus please ? @Html.TextBox("SiD", "Special ID here", new {@class="form-control"})Special ID here" clear on focus please ? Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sandip G PatilRank #1,083 · 1.8K reputationPosted Mar 24, 2017, 4:11 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 24, 2017, 4:11 AM EDT
@Html.TextBox("SiD", new {@class="form-control",placeholder=""Type Special ID here})Ranjeet PatraRank #1,436 · 1.1K reputationPosted Mar 24, 2017, 4:29 AM EDT
@Html.TextBox("SiD", "Special ID here", new { @class = "form-control",onfocus="if(this.value=='Special ID here') this.value='';" });@Html.TextBox("SiD","", new { @class = "form-control", placeholder = "Special ID here" });