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 9129205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:41:33+00:00 2026-06-17T07:41:33+00:00

How can I implement the following Scenario: I would like to have a signup

  • 0

How can I implement the following Scenario:
I would like to have a signup wizard that creates the userProfile account. In that form I have a companyName (required). I will then take that companyName and start a record in the companyInfromation Table. All of the columns in this table should be nullable since I am starting the record on user signup.

After the user signs up they are prompted that they are required to finish filling out the company information, so they are taken to the company information form.

now here is my question, how can I make this form have required attributes and make the user fill out all of the required information? (Not just JavaScript but also modelState validation) I thought about a viewModel but I’m getting a bunch of “cannot convert the type ‘project.model.companyinformation’ to project.model.companyinformationviewmodel'” error.

I’m very new to C#, asp.net MVC. I used to just take the easy way out and use vb.net and asp.net webforms.

Any help would be greatly appreciated.

  • 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-17T07:41:35+00:00Added an answer on June 17, 2026 at 7:41 am

    Creating a model is the correct approach. You can’t cast from entity to model. You need to transfer the data yourself.

    var entity = GetEntity();
    var model = new MyModelType();
    model.ID = entity.ID;
    model.OtherField = entity.OtherField;
    

    There’s a useful project called AutoMapper that can automate this for you.

    An alternative approach is to create a custom validation attribute RequiredIf. This would validate if a specified boolean field has a value of true:

    public class MyModelType
    {
        [NotMapped]
        private bool _enableFullValidation;
    
        [RequiredIf("_enableFullValidation")]
        public string MyNoneRequiredDBField { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to implement the following scenario in Haskell. I have an enumerable
I have an the following scenario: // several classes that implement different interfaces class
Following is the scenario. I have something called as Domain which can have multiple
What would be the best method to implement the following scenario: The web site
I have the following scenario: there are a database that generates a new logTable
I have the following scenario: I have a QueueReader class that will be reading
Can someone please tell me how I can implement the following line of pseudo-code.
How can I implement the following query with Query Builder? SELECT * FROM t
How can I implement cross browser opacity gradient (not color gradient)? See following code:
I know that classes can implement various special methods, such as __iter__ , __setitem__

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.