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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:22:51+00:00 2026-06-12T00:22:51+00:00

below is my code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc;

  • 0

below is my code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Models = We.Models;
using We.BAL;
using System.Globalization;
using System.IO;
using System.Text;
using System.Web.Helpers;
using System.Diagnostics.CodeAnalysis;
using System.Security.Principal;
using System.Web.Routing;
using System.Web.Security;
using PagedList;
using We.Models.ViewModels;
using We.Models.Interface;
using We.Models.DBData;
using We.Models.Repository;
using System.Data.Sql;
using System.Data.Query;
using System.Data.SqlClient;  

namespace We.Controllers
{
    public class ClientEnquiryController : Controller
    {
      private Models.Interface.IPolicyService _repository;  
      private Models.Repository.PolicyServiceRepository clientenqRepository;    

      public ClientEnquiryController()
           : this(new Models.Repository.PolicyServiceRepository())
      { 
      }

      public ClientEnquiryController(Models.Interface.IPolicyService repository)
      {
        _repository = repository;
      }

      public ActionResult MasterView( string PolicyNo, string carrierCode, string sPol, string languageCode)
      {
        carrierCode = "2";
        sPol = "502-0877220";
        languageCode = "eng";
        return View(_repository.policymaster(carrierCode, sPol, languageCode));            
      }

From my codeI am do the return like this :

return View(_repository.policymaster(carrierCode, sPol, languageCode));

how about if i want return the view with more than one statement in same time? for example:

_repository.policymaster(carrierCode, sPol, languageCode);
_repository.policyAgent(carrierCode, sPol, languageCode);

Anyone can help 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-06-12T00:22:52+00:00Added an answer on June 12, 2026 at 12:22 am

    I think you might benefit from modelling the view with the two return objects. For example,

    public class MasterViewVM
    {
        public PolicyMaster {get; set;}
        public PolicyAgent {get; set;}
    }
    

    Then you return the view model with the data entities:

    public ActionResult MasterView(string PolicyNo, 
        string carrierCode, string sPol, string languageCode)
        {
            carrierCode = "2";
            sPol = "502-0877220";
            languageCode = "eng";
            MasterViewVM model = new MasterViewVM
            {
               PolicyMaster =_repository.policymaster(carrierCode, sPol, languageCode),
               PolicyAgent = _repository.policyAgent(carrierCode, sPol, languageCode)
            };
           return View(model);
        }
    

    Another possibility is to use a child action. See

    http://haacked.com/archive/2009/11/18/aspnetmvc2-render-action.aspx

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

Sidebar

Related Questions

I have the below code: CODE BEHIND: using System; using System.Collections.Generic; using System.Linq; using
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MvcApplication3.Controllers { public
I tried accessing web for xml parsing using the code below: System.Uri proxy =
here the c# code I use to respond xml data using System; using System.Collections.Generic;
The code below is in C# and I'm using Visual Studio 2010. using System;
I am using the code below to get processor id: System.Management.ManagementClass theClass = new
i am using below code to change the the font type of text view.
i found the code below in stackoverflow for resumeable file downloads : using System;
I am using below code to upload excel and INSERT in mysql in php
I am using below code to get profile image of friends using Resfb. I

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.