948 questions
0
votes
1
answer
1k
views
Loading JQuery in Partial View on MVC
I have an ASP.NET MVC C# web application.
In my layout file I have the following ajax call
<li class="PriceModal">
@Ajax.ImageActionLink("/InternalDB/Content/...
0
votes
0
answers
95
views
How to access partial view model using jquery
I am having one view with partial view containing set of dropdown list. On the click of save button on main view needs to check if atleast one dropdown value is selected or not. I am not able to get ...
-1
votes
1
answer
2k
views
how to get partial view input field value by id using jQuery in asp.net mvc
I have a razor view a part of which populates the mobile number of the logged in user using partial view
<div class="form-group">
<div class="col-md-10">
...
1
vote
1
answer
799
views
asp.net MVC5 handling errors inside child action method in parent view -- would like to redirect to error page
I'm still somewhat new to ASP.NET MVC so I hope my question is clear. In my project I have a parent view, that renders partial views inside the parent view by calling @Html.Action(controller action ...
0
votes
1
answer
1k
views
Pass javascript variable to @Url.Action in ASP MVC
In my view i have two divs with controller and action method name in data-url attribute. When the page gets loaded, i am looping through these div classes and getting the name of the constructor and ...
0
votes
1
answer
1k
views
How to properly use multiple partial views with different models ASP CORE
I have this in my cshtml file
<div class="login">
@await Html.PartialAsync("_Login")
</div>
<div class="register">
@await Html.PartialAsync("_Register")
</div>
And my ...
-1
votes
1
answer
1k
views
Checkboxlist MVC Partial
I have the following view model code:
public class TestCheckboxlistParentModel
{
public TestCheckboxlistParentModel()
{
CBL = new TestCheckboxlistModel();
}
public ...
0
votes
1
answer
2k
views
MVC, how to temporary (5 seconds) display a View with the message, while being redirected to another View
I have an MVC application.
I have a View A that renders partial View _B.
View A has a logic that defines when to show partial View _B and when not:
@if (!(bool)ViewData["PasswordChanged"])
{
<...
1
vote
1
answer
795
views
mvc - How to assign a value to a partial view property from withing its parent view
I have a View A, View B, and a View _C.
View _C is a partial view that is rendered inside of View A and B:
View A:
<div style="margin-top:20px;">
<div>
@Html.Partial("~/...
0
votes
0
answers
41
views
Save input data in multiple Asp.NET partials
I have an order page and the order form is divided into 3 separate forms, like tabs, and for each separate form I've created a partial view, loaded using ajax on a button click.
Here is the Order ...
0
votes
1
answer
669
views
Passing same Model/ViewModel to multiple Partial Views (tabs in jquery)
A bit new to .Net + MVC dev.
background... in my lil app i have 3 tables ... applications, databases, and app_db_support table. The 3rd table has fks to the first 2 and stores associations.
Want to....
0
votes
0
answers
681
views
Using BeginCollectionItem for adding/deleting Lineitems in MVC5 partialview
I'm trying to add/delete EnquiryLineItems into Quotation View.
Tried to follow
MVC 5 Dynamic Rows with BeginCollectionItem
BeginCollectionItem partial within partial not behaving correctly
MVC 5 ...
1
vote
1
answer
179
views
MVC PartialView is not populated with model details
I intend to display a list of employees with about five columns on the left side of my razor view, and on selecting any employee (row), display details of the employee as a readonly partial view on ...
1
vote
0
answers
16
views
model to partial view and get back null [duplicate]
I'm new of asp.net mvc. I'm making a small application of shopping car. I use a shoppingCar view and use partialview to show products in shoppingcar view. And I want to check the BuyerName and Deliver ...
0
votes
0
answers
105
views
How to send the Model to a partial view and change it's value in the controller before it arrives to the partial view and update with ajax [duplicate]
Hi what I want is to call a partial view from 'index.cshtml' passing it the model and some string input and when we get to the function 'ContactsTable' in the controller i want to get the model which ...
0
votes
1
answer
2k
views
how to update different Partial view using one ajax call
In above image when double click on div(First Image) then View dialog box(second Image) both case content printed same data but structure is different.
controller
[HttpPost]
public ...
1
vote
2
answers
2k
views
ASP MVC 5 - Multiple Partial Views added Dynamically with cascading DropDown Lists
The issue I am facing is similar to this old post cascading dropdown for dynamically added row. I am using the "BeginCollectionItemCore" NuGet package to setup a set of partial views, so I have ...
1
vote
1
answer
490
views
Form post from partial view to API
I am trying to create an SPA application using Sammy. When I call #/entitycreate link, I return a partial view from Home controller which contains an html form to submit. Partial view comes as I ...
0
votes
1
answer
5k
views
DataTable in partial view
I have datatable in _layout that works fine all other tables except this particular one I have in a partial view perhaps because of the way the data is loaded.
_layout.cshtml
$('.dataTableList')....
0
votes
1
answer
739
views
Render PartialView using ajax after select item from dropdownlist
I have the following ViewModel
public class ReservationDetails
{
public ReservationDetails()
{
}
public Reservation Reservation { get; set; }
public List&...
2
votes
2
answers
1k
views
Partial View Not Rendering inside div
So I was trying to follow this guide and the followup article.
But Before I started with the searching, sorting and filtering, I wanted to see if even the pages were working as intended.
...
2
votes
2
answers
3k
views
MVC - Returning partial view is creating a new page
I have a form with some input fields. When a user clicks on the submit I want to post the fields back, use them to query a service and load some results into a view on the same page while preserving ...
2
votes
1
answer
567
views
Pass objects from PartialView to Controller
Below is the html for a View I am working on. It contains a table that is able to add additional rows as needed. The table is initially filled with a SalesOrder object upon returning this particular ...
0
votes
0
answers
457
views
Partial view inside main view + save to DB
I am making a site for entering metadata. On the first tab (CSS tabs) I have few dropdowns and after you make the choices, the second tab is unlocked.
Right now the second tab is empty, and the ...
1
vote
1
answer
433
views
Can't pass data from model into Partial View
The Issue is I can't pass data from model to PartialView. Here is how I've done it.
My PartialsController.cs
public PartialViewResult _GridView()
{
var currentUser = UserManager....
0
votes
1
answer
1k
views
@Html.DropDownList not showing selected value
I am trying to create one partial view to create drop down on every view. Have created one view model and partial view for the same. Its creating drop down properly but not showing selected value.
...
0
votes
0
answers
206
views
Error in mvc partial view form submission?
I have a MVC partial view called BasicUserDetailsDisplay
public PartialViewResult BasicUserDetailsDisplay(string id)
{
var user = userService.GetUserInfo(id);
return ...
1
vote
1
answer
2k
views
Display error message in the same dialog popup in mvc
I have a MVC application where I implemented an advance search dialog popup. If the user do not type anything in any of the textbox and they click the search button, I want to keep the popup open and ...
1
vote
1
answer
243
views
Highchart in ASP MVC page load not working properly
I have a question for Highchart using in ASP MVC5. I have 6 charts and I am showing just the one for the first page load. All my tags for chart creation and data in partialview. my javascript is also ...
1
vote
2
answers
1k
views
MVC 4 Custom validation on Partial View don't show error message ?
When i click Submit button on index page, see following image:
My question:
I'm just custom required attribute, why error message for ProductDescription don't show ?
All my file, see the below ...
0
votes
1
answer
1k
views
Partial View is not rendering properly, after JQuery Ajax submit
I submit a form post in Asp.Net MVC Partial View with JQuery Ajax.
The Partial View is inside one of the tabs in bootstrap tabs (there is 4 tabs and each tab has its Partial View). And there is a ...
1
vote
1
answer
93
views
Calling PartialView Doesn't work on External Network
I'm trying to load a partialview from a JQuery load function
The above basically calls a Load Action from Codes Controller
This works when accessing the Web Application on an internal Network but not ...
0
votes
0
answers
851
views
Asp.Net Mvc Layout and Partial- view
there.. I'am really confused about Layout and PartialLayout.
I don't know what wrong I'am doing.
When I login as Admin I can se all links even this Admin links ("Register", "Role", "Department" and "...
0
votes
0
answers
69
views
Replace first visit data with user selected data in ASP.NET MVC
I have a single page application that loads a string from a database into a partialview when a button is clicked, which is below and this works fine.
View
<div class="text-center">
<...
1
vote
2
answers
4k
views
Bootstrap tabs not working for a view with two partial views
I have a main view which has two tabs. The first tab is the default tab and should display the first partial view and the second tab should display the second partial view. While I am getting that to ...
0
votes
0
answers
138
views
How to render Razor PartialView with Ajax when link is clicked
There is a view like:
<a href="#">Render PartialView-1</a>
<a href="#">Render PartialView-2</a>
@foreach(var item in Model.List)
{
<!-- Some HTML Codes -->
<...
0
votes
2
answers
3k
views
In asp.net-mvc what is the faster way to check if a partial view exists from Site.Master file?
I have code in my Site.Master file that looks like this:
<% var menuName = StaticHelper.GetSiteMenuName(); %>
<%Html.RenderPartial("Menu" + menuName .ToUpper()); %>
So if your menu name ...
0
votes
1
answer
1k
views
Partial View with different ViewModel than Parent's ViewModel
In my View I'm displaying a dropdown for selecting a list of years. But the data corresponding to selected year comes from more than one tables. And hence a Partial View's data corresponding to ...
2
votes
1
answer
7k
views
Is it possible to load a partial view in a partial view?
can i create a webpage with a partial view which has another partial view inside?
I already tried but it ends all the time in an endless loop.
So just the question is this possible?
I add a image to ...
0
votes
1
answer
3k
views
Different Partial Views on Tab click
I have two partial views which need to be loaded when their respective tab is selected. I am unable to get the tabs to change and it always shows the same partial view.
I tried to base my code on this ...
0
votes
1
answer
380
views
Returning one of the two Partial View from Controller
In my view I am rendering partial view for registration form:
<div class="col-md-8 regform">
@Html.Partial("_RegistrationForm",Model)
</div>
Now when user submit the ...
0
votes
1
answer
540
views
Partial View Name in Ajax response
I have a controller that returns one of two partial view depending on condition.
Controller
public ActionResult ReviewCart(DepartmentProductViewModel model)
{
if(somecondition)
...
0
votes
1
answer
6k
views
Bootstrap-modal: Partial view displayed in modal-body
I'm attempting to load a partial view inside a bootstrap model. Since I have an existing form in the parent page and another in the partial view. I cannot decide to put the forms on one pages, because ...
3
votes
2
answers
2k
views
Request.IsAjaxRequest() alternative in MVC6
I am trying to run this example Rendering Partial Views using ajax, but i got the following compilation error:
'HttpRequest' does not contain a definition for 'IsAjaxRequest' and no extension method '...
1
vote
0
answers
796
views
HandleUnauthorizedRequest for partial view redirects and adds new view at bottom of page
It's a little hard to explain in the tittle. Basically I have a MVC app that has a shared View. The shared view is the header, then I have views that load in it depending on which tab the user picks.
...
1
vote
1
answer
5k
views
Partial Views with different model in Asp.net MVC
i have two class as below
Model:-
public class RegisterViewModel
{
public string Email { get; set; }
public AddressPropertyVM AddressProperty { get; set;...
1
vote
0
answers
906
views
Override @Html.Partial before it is rendered
I am rendering Partial view inside a parent view
@Html.Partial("_OrderDetails.Info", Model)
But is it possible to override _OrderDetails.Info partial view with another partial view before it is ...
0
votes
1
answer
71
views
Confused on passing parameter to MVC Partial View?
I inherited an MVC site and was asked to combine two pages into one. Since both Views have their own View Model, I thought instead of pushing the two VMs together that I could use a Partial View to ...
1
vote
1
answer
1k
views
Javascript in MVC Partial view stops working when View is replaced
It's at bit difficult to explain the issue in the Title but did my best.. This is about Partial Views that uses Javascript from the main view.
So I'm building a website that uses a wizard driven ...
0
votes
1
answer
2k
views
How to Pass a Partial View To Layout
This is a sanity check on my approach to passing a partial view to the layout header.
In my layout, I have a location for the navigation buttons I want to display for each page.
Using a view model ...