Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8314559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:51:37+00:00 2026-06-08T20:51:37+00:00

Is there any way in MVC to specify Empty Text for text fields? Empty

  • 0

Is there any way in MVC to specify “Empty Text” for text fields?

Empty Text is normally a property give to a textbox to display when text is empty, and is cleared out OnClick.

For example: have the text box say “Enter here…” and then onFocus that text would clear and allow you to type in the entry, however if text is empty, “Enter here…” would display again.

I’m trying to find out if there’s any ways to get this out of the box w/o any additional coding, as this feature is widely supported by 3rd Party controls (ie: Telerik’s AJAX Controls) does anyone know if MS made any provisions to offer anything similar?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:51:39+00:00Added an answer on June 8, 2026 at 8:51 pm

    You could use HTML5 placeholder attribute:

    @Html.TextBoxFor(x => x.SomeProperty, new { placeholder = "some default text" })
    

    And if you need to support older browsers you could always achieve the same effect with javascript. For example there are existing jQuery plugins such as jQuery.placeholder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to render ASP.net MVC controls or code directly within a
Is there any way to use server controls in ASP.NET MVC? Specifically I need
Using ASP.Net MVC 2, is there any way to use the RedirectToAction() method of
Is there any way in Spring 3 MVC to gain access to the request
Is there any way to specify that a given Controller or Action uses Session
Is there any way to get truly restful routing working in MVC, just like
Is there any way to find if a site developed by ASP.NET MVC or
Is there any way to set different errors according with logic in MVC 3.0
Greetings, Is there any way to show JQuery Nice Confirm Dialog Box in MVC,
is there any way in MVC to get the System.Net.Mail SendAsync to work, instead

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.