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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:01:15+00:00 2026-06-07T21:01:15+00:00

I have a few strongly-typed partial views which displays output in a list format.

  • 0

I have a few strongly-typed partial views which displays output in a list format. Here is one of the Partials:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Student.Models.vwStudent>>" %>

<table>
        <tr>
            <th>
                Student ID
            </th>           
            <th>
                Past Due Amount
            </th>
            <th>
                Past Due Days
            </th>            
        </tr>

        <% if (Model != null)
           foreach (var item in Model) { %>

        <tr>
            <td>
                <%=Html.TextBox("StudentID",item.StudentID) %>
            </td>

            <td>
                <%=Html.TextBox("PastDueAmount",item.PastDueAmount) %>
            </td>
            <td>
                <%=Html.TextBox("PastDueDays",item.PastDueDays) %>
            </td>            
        </tr>

    <% } %>

    </table>

Here is how I access above partial in master:

<% using(Html.BeginForm("SaveStudentInvoice", "StudentInvoice")) %>
<% { %>
<% Html.RenderPartial("DisplayStudentInvoiceList"); %>
<input type="button" id="Submit" name="Submit" value="Submit" />
<% } %>

Now, I have a “Save” button in master which when I click should save Student ID, Past Due Amount and Past Due Days in a table. How can I access the partial view elements Ids and Names in Master view to do the insert?

Thanks in advance.

  • 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-07T21:01:16+00:00Added an answer on June 7, 2026 at 9:01 pm

    In ASP.NET MVC Views/MasterPages don’t do inserts. They display data. It’s controller actions that do inserts. The partial view example you have shown is only displaying the student data details as labels. If you want to send them back to the server (for insertion) you should use an HTML <form> (<% using (Html.BeginForm("someAction", "someController")) { %>) and input fields (Html.EditorFor helper) instead of simple labels.

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

Sidebar

Related Questions

Hólla everybody, I have a strongly typed view and for one int Rating property,
I have few graphic effects on image which i am able to run on
Here is my problem. I have a list of models that are displayed to
Here is my problem. I have a list of models that are displayed to
I have few textblocks, with custom font family which work fine: FontFamily={StaticResource CodeBold} This
I have been having multiple problems with getting the Add View.. Create a strongly-typed
I was thinking if it is possible to re-use the views. I have few
I have few controls on my MainForm in Winforms application. For example control that
I have few bash scripts which are adding to cron jobs with specified timing,
I have few jquery tabs on a usercontrol that loads a separate user control

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.