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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:25:21+00:00 2026-06-01T18:25:21+00:00

Basically, instead of writing plain old Html to build a form, I would like

  • 0

Basically, instead of writing plain old Html to build a form, I would like to invoke a helper method and have that return what I need.

<div class="contacto-container">
    <h1>Envíenos sus consultas:</h1>

    @Html.Editor("BuzonDeSugerenciaModel", "BuzonDeSugerenciaModel")

    <div class="separator"></div>    
</div>

This isn’t really doing what I think it would do.

It outputs:

<input id="BuzonDeSugerenciaModel" 
       class="text-box single-line" 
       type="text" value="" name="BuzonDeSugerenciaModel">

And not the collection of inputs I declared in the Model class, BuzonDeSugerenciaModel.

If this were a strongly type View, it would be fine if I went:

@Html.EditorForModel()

However, since this is run in the _Layout.cshtml file, I need something else. I can’t quite figure out a way to do this.

Any ideas?

  • 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-01T18:25:23+00:00Added an answer on June 1, 2026 at 6:25 pm

    You need to create a partial view that is strongly typed to your BuzonDeSugerenciaModel class. This partial view will live in your Views > Shared directory.

    Something like this (_BuzonDeSugerenciaModel.cshtml):

    @model BuzonDeSugerenciaModel
    
    @Html.EditorForModel()
    

    Then, in your _Layout.cshtml, you can call:

    @Html.Partial("_BuzonDeSugerenciaModel", Model.buzonDeSugerenciaModel)
    

    You will need to pass an instance of BuzonDeSugerenciaModel as the second argument to Partial(). If you do not have one passed form the Controller, something like this will work:

    @Html.Partial("_BuzonDeSugerenciaModel", new BuzonDeSugerenciaModel())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a control that I would like to be static, but instead of
I have a line series chart called lineSeries1. I would like that chart to
Basically, I'd like to do the following, only using Common Lisp instead of Python:
Basically, I would like a brief explanation of how I can access a SQL
I need to have a RegEx that will match a URI like this based
I have a wrapper around the in-built warning() function in R that basically calls
I'm writing a small app that needs to have a super easy install process.
Basically url escapes a string except uses '+' instead of '%20' for spaces.
basically what i want is redirect al request to use HTTPS instead of http
I basically want to make things easier by just looping LinkButtons instead of making

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.