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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:10:45+00:00 2026-05-31T08:10:45+00:00

In my ASP.NET MVC 3 project I have a master layout with a section

  • 0

In my ASP.NET MVC 3 project I have a master layout with a section defined. This section is responsible for displaying content in a sidebar, when it has any content assigned to it.

The problem I’ve encountered is the following:

I have some edit views, where both the sidebar and the main area is used for editing data. In this case the sidebar and the main body should be wrapped into one single form with a single submit button.

What is the best solution for this? The solution I came up with is that when the functionality I mentioned is necessary, I set a boolean property in my ViewBag. If this property is true, the master layout is rendered with the sidebar and the main content area wrapped in a form.

Is there a better way to this? The solution I described is a bit ‘hackish’ for me.

  • 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-31T08:10:46+00:00Added an answer on May 31, 2026 at 8:10 am

    I would have two layouts. One with a seperate side-bar, and one without. Then, in the pages you need a sidebar with editable fields, you include the sidebar in your content page, not in the master.

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

Sidebar

Related Questions

I have a master page in my asp.net MVC project, which has code like
I have this code in my ASP.NET MVC project master page: <% switch(Request.Browser.Browser) {
I have a hybrid ASP.NET WebForms/MVC project. In my Master Page, I have a
I created a default ASP.net MVC project. In the Master page I have the
I have something like this in Site.Master in an asp.net mvc3 (not razor) project:
In our ASP.NET MVC project we have a Strings.resx file and the accompanying autogenerated
I have an ASP.NET MVC project and I have a single action that accepts
I have an ASP.NET MVC project with a form. In the Action method that
I have a new ASP.NET MVC project (my first), and I had been running
I have a new asp.net mvc project and i am trying to figure out

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.