Questions tagged [asp.net-mvc-partialview]

A partial view enables you to define a view that will be rendered inside a parent view. Partial views are implemented like as user control in Asp.Net Web forms that is used for code re-usability. Partial views helps us to reduce code duplication.

951 questions
-1
votes
1 answer

MVC form Post null at controller

Building a form that allows user to add infinite lines. This is done with ajax call to controller that adds a partial view (one time per click). I am using Html.BeginCollectionItem to index each input in the partial views. I can add a bunch of items…
BattlFrog
  • 3,370
  • 8
  • 56
  • 86
-1
votes
1 answer

Two strongly types partial views in one razor view

I am using Asp.Net identity logic module for authentication process. I am using this theme for login and signup and external logins all in one view. Here is my Login.cshtml view that contain social login, register and login partials @using…
-1
votes
1 answer

Bootstrap Modal Not Appearing

In my ASP.NET MVC Partial View I am using a Bootstrap Modal by showing some DropdownList. In same PartialView I am creating some buttons dynamically according to the data fetch with same name. On Button click I am calling a javascript function,…
-1
votes
2 answers

SetInterval and SetTimeout not working when trying to load a Partial View

I'm trying to use JQuery to reload a PartialView in an ASP.Net MVC application. My code:
@Html.Action("GetRemainingSeats", "Layout")
-1
votes
1 answer

MVC Partial View in other view

I have two views for creating an Owner or Service Company, each one having their own table. When a user registers using the standard View->Account->Register view I have added a radio button to ask if they are an Owner or Service Company. What I am…
-1
votes
1 answer

Partial View Submit Button Not Working

My problem is that, the submit button is not working. As you can see, my partial view contains a jquery modal. If you click "mdlist" the modal will and appear with the submit button. Can you please tell me whats the possible problem. @model…
user3035024
  • 199
  • 2
  • 5
  • 17
-1
votes
3 answers

Linq query in Partial View or controller

I would like to know your opinion about this: I have a linq query inside a partial view (the main page calls @html.action(mypartial) that returns data from a PartialViewResult) and I would like to see what is the best approach: Please justify your…
WPalombini
  • 691
  • 9
  • 25
-1
votes
1 answer

In asp.net-mvc, what is the best way to return a partial view as well as other data from an ajax call?

I have a regular ajax call where the server side returns a partial view (html). I now have a situation where i need the server to passback some additional data besides the partial view. The only thought i had was to change the return to json and…
leora
  • 188,729
  • 360
  • 878
  • 1,366
-2
votes
1 answer

include jquery in partial view and layout page in asp.net mvc

I have been stuck on this for a while. I have a layout page that loads jquery version 2.2.3. And i have some div's (info-boxes sort) in which I load a partial view which has a jqgrid. Jqgrid needs jquery library, so i have jquery library in my…
newbie
  • 173
  • 4
  • 21
-2
votes
1 answer

Why Can I not do a subrequest for a Partial View for each request?

In _Layout.cshtml, I have this part of code
@Html.Action("BestStudent", "Student")
In Student Controller I have created BestStudent method as below public class StudentController : Controller { private UniversityInitial…
Dea
  • 291
  • 3
  • 6
  • 17
-2
votes
1 answer

MVC5 Partial View Example

I am seeking to create a reusable "employee lookup" control. Note:I am assuming that a partial view is the best way to go. I want multiple buttons on the page Each button will call a PartialView and each button will have a specific textbox Each…
BeYourOwnGod
  • 2,345
  • 7
  • 30
  • 35
-2
votes
1 answer

Object reference not set to an instance of an object. Only get this error when I use a partial View

I used the exact same actionResult and generated a View (that is not partial) and the code worked just fine. But when I use a partial view I get the error: Object reference not set to an instance of an object. But the reference is not null, the list…
-2
votes
1 answer

Using Bootstrap Modal how to Render

I've got a big problem. I just want to have my Create - View for new VacationRequests in my Index-View It's not possible for me to have two different models in one view. @*@model…
-2
votes
1 answer

Is it possible to load a partial view via string replacement in a controller in asp.net MVC 5

In web forms I could load a user control via a string replace when parsing data from the database. Is it possible to do this in MVC? What I am trying to achieve is to allow users in a cms to register a form in a page via a text string [form contact]…
DCADS
  • 73
  • 2
  • 8
-2
votes
2 answers

What should I return when modelstate is invalid?

I have a partial view in a layout file, my partial view has a form and some server side validation. when my form is submitted and modelstate is invalid what should I return? something is bold here: 1) I don't want to use javascript 2) I want to show…
1 2 3
63
64