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

  • SEARCH
  • Home
  • 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 7027919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:18:43+00:00 2026-05-28T00:18:43+00:00

I am new to ASP.NET MVC and am finding the options for displaying something

  • 0

I am new to ASP.NET MVC and am finding the options for displaying something like an SSN to be a bit much.

I have a need to display various types of unique ID’s, but the UI calls for the parts of them to be split out into different text boxes. For example, a Social Security Number with the first three digits in a text box, the next two digits in another text box and so on. I used jQuery auto-tab plugin to help the user quickly enter the data.

With regard to hooking this up to MVC3, it seems like I should use an Editor Template like this and use the [UIHint(“ssn”)] along with @Html.EditorFor:

@model string
@Html.TextBox("", Model != null ? Model.Substring(0, 2) : "")
@Html.TextBox("", Model != null ? Model.Substring(2, 5) : "")
@Html.TextBox("", Model != null ? Model.Substring(5, 3) : "")

Is this the best way to be going about this?

  • 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-05-28T00:18:44+00:00Added an answer on May 28, 2026 at 12:18 am

    Is this the best way to be going about this?

    Using a custom editor template to split the SSN into 3 textboxes is definitely good but I am afraid it is only the first part (it is the way to present the view model inside the view).

    But I guess that since you are presenting those values in textboxes you will expect the user to enter some values into these textboxes. And that you will probably want to fetch those values back into the SSN property of your view model when the user submits the form. This will be the second part. You might need a custom model binder to handle this. Hansleman blogged with an example.

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

Sidebar

Related Questions

I'd like to have some of the ScriptManager features in the new Asp.net MVC
I have a new asp.net mvc project and i am trying to figure out
I created a new ASP.NET MVC application. The home page looks like this: I
I have created the following project structure for my new asp.net mvc project any
Had something weird start happening to me today. I have an asp.net mvc app
We are starting a new ASP.NET MVC project and we would like to establish
I have a new ASP.Net MVC application that I am about to start and
I am knee deep in starting a new ASP.NET MVC project. Several tutorials have
I have a new ASP.NET MVC 3 project, and MVC and Razor are all
i have to create a new asp.net mvc page that integrates content provided by

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.