948 questions
0
votes
1
answer
48
views
Having trouble using fetch API to load ASP.NET MVC partial view which includes Quill rich-text editors
I am trying to use fetch to load a partial view which includes several Quill containers. Using Fetch, the Quill editors are not rendered. There is no comparable problem using jQuery's load method.
...
1
vote
1
answer
77
views
How to update partial view list in a "Create" view after submitting input in a ASP.NET core MVC web app to server?
I am new to ASP.NET core MVC web app. I have written an app that users can scan in their RFID card id. This task is done in a "Create" view. When they submit the input, the system will ...
0
votes
0
answers
25
views
Input type file - filelist, is always empty in partial view that is inside a partial view
I was able to get the filelist when the element was in the view > partialview1. But i had to change the interface a little bit so, it got moved to, View > partialview1 > partialview2. After ...
0
votes
0
answers
42
views
Unable to Submit Partical View form to Controller
I am trying to submit a form to my MVC controller. The form is in a partial view and when I hit submit it returns with a 500 error at the path for the action and controller: "https://localhost:...
0
votes
1
answer
51
views
.Net Core MVC: how to get partial view name in razor
.Net Core MVC.
In all my views and partial views, I use this line to get its path (url)
<span>@(this.ViewContext.View as Microsoft.AspNetCore.Mvc.Razor.RazorView).Path;</span>
(and also ...
0
votes
1
answer
63
views
PartialView does not work properly when called from Layout.cshtml
enter image description here - issue added as it stack overflow is not accepting the code
i am trying to call a partial view(there is a button on the click of which i should be able to close a div ....
1
vote
1
answer
215
views
Use a view in another one
I have an ASP.NET Core MVC application using Razor and Entity Framework, and I try to include a (child) view in another one (parent).
A problem which I see is that they use different controllers. I ...
0
votes
0
answers
47
views
ASP.NET MVC 5 - Generate different forms based on selected DropDownList option
I want to generate (or display hidden maybe?) different type of form depending on the selected Option in a DropDownList. What would be the best way to do that?
I have tried having in the base view ...
0
votes
1
answer
123
views
IIS not displaying partial pages for ASP.NET Core MVC web application
I have an ASP.NET Core MVC web application that I'm trying to host in IIS (as a nested application). The problem is that when I run a page that has a partial view (a list object that displays a table),...
0
votes
0
answers
54
views
ASP.NET Core IIS is missing data
I've got an ASP.NET Core MVC web app that I'm running through IIS. The problem is that when I run it my partial pages/images and css files aren't being loaded correctly to the page.
Example of ...
0
votes
0
answers
46
views
About ASP.NET Core 6 MVC web application
I need to add some CSS to the Register and Login buttons in [partial name="_LoginPartial"] tag in my ASP.NET Core 6 MVC web app project. How could I do that?
I have tried to make them (...
0
votes
0
answers
42
views
Partial View Model Error (.net Framework)
I have this model in my view:
@model MGDanismanlik.Controllers.SettingsController.WorkCampClas
I call this partial view bottom of the view:
@Html.Partial("MonthlyResultPartial")
This is ...
0
votes
1
answer
44
views
The partial view 'AllCars' was not found. The following locations were searched: /Views/Cars/AllCars.cshtml /Views/Shared/AllCars.cshtml
I have a problem when starting a project with the given code
<h1>All cars</h1>
<h3>@Model.currCategory</h3>
<div class="row mt-5 mb-2">
@{
foreach (...
-1
votes
2
answers
1k
views
ASP.NET Core 6 MVC return partial view using Json
I am writing an ASP.NET Core 6 MVC application.
I have a method in a controller that I need to retrieve a Json value like this
a boolean and a Partial View with the model class
return Json(new { ...
4
votes
1
answer
3k
views
When to use partial view and ViewComponent?
I am beginner for asp.net core. I am building file conversion website. PNG to JPG, PDF to Word etc.. In there I amusing fileuplaod control to upload content for the conversation.
Instead using same ...
0
votes
1
answer
502
views
Partial View error HttpServerUtility.Execute blocked while waiting for an asynchronous operation to complete
My application is running on MVC 5 . Recently I upgraded the Npgsql nuget package version and after that started getting below error in the application.
**Error :- **
HttpServerUtility.Execute blocked ...
0
votes
1
answer
66
views
The tools of inline editor is not showing for modal and textarea
I wrote this code to integrate the editor:
<script src="https://cdn.ckeditor.com/ckeditor5/18.0.0/inline/ckeditor.js"></script>
<div class="col-sm-12" id="...
0
votes
1
answer
90
views
Transfering Id Data From View To Partial View And Then To Controller In .NET MVC Web App
I am trying to send an Event id (Model name is event) from my event view to a partial view in which you could comment on that related event (which is encuptulated by that view and rendered via ajax) ...
0
votes
2
answers
2k
views
Bootstrap Modal throwing Illegal invocation error in asp.net core partial view
I am using asp.net core to loop over the list of model objects and in each iteration, I am calling a modal to open with anchor tag. The code is given below.
foreach (var job in Model)
{
<div ...
1
vote
1
answer
2k
views
How do I load a partial View (modal popup) in MVC Areas I'm using Visual Studio 2022 .NET 7
Here is what I have tried
The code runs perfectly until I try to implement it in my ÄdminPortal MVC Area, then the Partial View doesn't popup at all. I'm sure I've missed something simply but being ...
0
votes
1
answer
126
views
How to pass a Azure Blob Model to another class in .Net 6
I am experiencing with the C#/.Net world using Azure Blobs.
I made a Gallery that takes the images from an Azure Blob Storage, and displays it on the screen.
I want to create a Partial View from it, ...
0
votes
1
answer
70
views
Bind Select List with ViewBag in PartialView - ASP.NET Core MVC
I have two models Employee and Department, i am trying to bind a Select List with Department model in Employee Create PartialView using ViewBag:
public class Employee
{
[Key]
...
0
votes
1
answer
1k
views
Pass current model to a Partial View in ASP.NET Core
I am working on an ASP.NET Core MVC application and i want to make CRUD operations using Modal popup. I used this code to display the Edit partial popup:
Index.cshtml:
@model IEnumerable<...
0
votes
0
answers
183
views
Partial View rendered in modal via ajax missing javascript events
Im having issues when placing html content from partial view into modal content via ajax, not all events defined in _layout.cshtml are being attached to elements in modal content.
Setup:
_Layout....
0
votes
0
answers
306
views
ASP.NET Core 6 MVC : partial view form action calling API controller replace / with %2
I am doing an ASP.NET Core 6 MVC app and I have a partial view calling an API controller.
In My controller I have defined a Route like this
[Route("api/[controller]")]
[ApiController]
...
0
votes
2
answers
85
views
Int null checker on a partial view
I have a partial view which does not have any parameters passed to it and is called by multiple apps.
I however want to change the requirements and pass a nullable int to it and a null checker, but it ...
1
vote
1
answer
224
views
How to load Partial View inside Button Popover?
I am trying to display a partial view inside a button popover.
cshtml:
<button type="button" class="btn btn-secondary" data-container="body"
data-toggle="...
0
votes
2
answers
396
views
how to fix delete record using partial view?
I want to delete the record from the table with modal but the partial view is not displayed in modal ...
How can I solve this problem !?
And that I can not use onClick !!!
this action for delete in ...
2
votes
2
answers
7k
views
Rendering html content in datatable
I am loading server response in a datatable using js in a asp.net core razor page. Because the data/UI is complex, I need to render different layouts based on current value in each table cell.
...
0
votes
1
answer
599
views
.net 6 MVC Razor site - loginPartial links don't open the page, routing issue? How can I fix this?
Basic site from the create project wizard, I added the Identity scaffold like I have done in the past.
Added the partial to include the _LoginPartial on my template nav bar. However, the links don't ...
-1
votes
1
answer
498
views
Rendering PartialView with complex object using jquery in .Net Core - not returning to ajax call
I have a very complex structure for my .Net 5 core mvc application. I am trying to use jquery to call controller method. I could send the json model to the controller. The controller action method is ...
1
vote
1
answer
150
views
Passing data from Action Method returning "PartialView()" into the parent View | using ASP.NET Core MVC and jQuery ajax
This is my main view named _ShowSingleProduct.cshtml:
<div class="col-md-7">
<!-- Review-->
<div class="product-review pb-4 mb-4 border-bottom&...
1
vote
1
answer
2k
views
ASP.NET MVC controller return partial view that is not in Shared folder
I have this method inside my controller that calls this partial view:
return PartialView("_tinzProdListPageTemplate", tblStoreLocation);
That partial view is inside the Shared folder and ...
0
votes
1
answer
4k
views
ASP.NET | Call another controller's action from a controller in MVC
I am thinking about a scenario rather similar to this question asked some time ago: How to call another controller Action From a controller in Mvc
In the scenario I am thinking of, controller B would ...
0
votes
1
answer
712
views
C# | Cannot convert 'string' to 'ModelExpression'
I want to make a partial view for form fields, so I don't have to write ~10 lines of boilerplate code everytime.
I tried the following:
FieldViewModel.cs
using Microsoft.AspNetCore.Mvc.ViewFeatures;
...
0
votes
0
answers
159
views
How to load another view after jquery result is success in Visual Studio 2022
Here is the code I used to do it in Visual Studio 2019
$.ajax({
type: "POST",
url: url,
data: { code: "ABC" },
success: function (response) {
$('.content-...
3
votes
1
answer
751
views
Returning PartialView with object or ViewBag
I'm working on an app where I have an Ajax call to a Controller like so:
$.ajax({
url: '@Url.Action("Test", "Test")',
async: true,
type: 'POST',...
0
votes
0
answers
177
views
Angular 2 (11) Is there a way to implement Partial Component similar to Microsoft Razor can with partial views?
In my Angular 11 application it would be especially nice to have partial HTML-only templates that a component can bind to for data grids and a few other purposes. I don't believe Angular supports ...
0
votes
1
answer
746
views
Asp.Net-Core pass JavaScript function to partial view
Using asp.net-core I made a "PopUp.cshtml" file:
<div class="popUpDeleteBackground" hidden>
<div class="popUpDelete">
<h3>Are you sure you ...
0
votes
1
answer
352
views
Show/Hide partial view result one display at a time in foreach statement in main view at the click of a button
I have a partial list view inside a main view. The partial view is rendered in a foreach statement in the main view. I want to present the partial view result one display at a time, at the click of a ...
0
votes
1
answer
178
views
Calling a view from different models in ASP.NET MVC
In my ASP.NET MVC application in the view, I'm calling another view that is not related to the current model. There I need some help that how to call the different model views from another view.
@...
0
votes
1
answer
237
views
How to save partial view html on page back
I have view with search bar and displaying table based on that search. So starting view looks like this:
I am displaying partial view in <div id="ajaxPartialView"></div>
So ...
3
votes
2
answers
2k
views
Setting Partial Page (View) search path in .NET Core Razor Pages and AJAX
I am having a problem setting the 'Search Path' for my Partial Pages (Views) in my .NET Core 3.1 app. When I place the _SomePartialPagePartial.cshtml in the default search path directories (/Pages/...
0
votes
1
answer
1k
views
Bootstrap 5 Accordion in Partial View (ASP.NET Core) cannot collapse after expanded
I want to generate a MVC partial view with a Bootstrap 5 accordion. Here is the code:
Index.cshtml
@{
ViewData["Title"] = "Home Page";
}
<input type=&...
0
votes
1
answer
1k
views
Using Modal JavaScript in the Partial View of .NET CORE will not work after Ajax Post
I use the Modal display field in the Partial View to input data for the User, and use [email protected]("Create") in the main screen to call Modal.
And wrote Autocomplete JavaScript in ...
0
votes
1
answer
176
views
remote validation does not work for partial view
I have order with several order items and I use partial view to load order items. I want to validate OrderLineItemEntity's ProductCode but it does not work. Every other property validation works which ...
0
votes
0
answers
97
views
Edit dynamic details of Data in Asp.net Mvc using Razor view
<!-- Product Details.cshtml -->
@model Test.Web.Models.Product
@{
ViewData["Title"] = "Details";
}
<br />
<h2 class="text-info">Product details</...
0
votes
1
answer
1k
views
ASP.NET MVC - Update Modal pop up after Form submit
I have modal popup containing partial view. this partial view is nothing but form. I have to update/refresh same modal popup with new partial view after Form submit, instead it reloads main page (...
0
votes
1
answer
75
views
loading html into modal breaks stuff in jquery validation
I have created a page that loads a partial view into a bootstrap modal (using jquery) when a link/button is clicked. However, doing this causes some undesired behavior that I need to fix.
The page is ...
-1
votes
1
answer
233
views
ASP.net MVC Partial view default [closed]
In my create view in asp.net MVC, I have created more than 5 partial views and the views show and hiding according to the selected value from the combo box.
So as an example, If the user selects the ...