Questions tagged [partial-views]

User control in Asp.Net Web forms that is used for code re-usability. Partial views helps us to reduce code duplication . Reusable views like as Header and Footer views .

Partial view is like a regular view with a file extension .cshtml. We can use partial views in a situation where we need a header, footer reused for an MVC web application. We can say that it’s like a user control concept in ASP.NET.

2715 questions
0
votes
1 answer

Partial View loading using javascript : Possible XSS by HP FORTIFY

I have a js function , which Fortify identified as XSS vulnerable as below. Can you suggest any solution for this since the method is intensively used in my app. I am here trying to call a partialview in ajax and the result html am appending to a…
0
votes
1 answer

Razor Pages: Page with partialview inside. How can i store my Data for the partialview?

Hello guys i am working on a projekt where i can add articles to a cart. My cart is a partialview.When i add a Article to my cart the old data isnt stored and only one (the new article) article is added to my cart. This is the code for the Post in…
flomue99
  • 87
  • 9
0
votes
3 answers

How to call a controller Action passing id parameters from a modal partialView?

I have an ASP.Net Core MVC5 project with a view containing partialViews. In it I show a Bootstrap modal that loads data from a record in context. I need the identifier of this record to be passed as a parameter in an tag that redirects to…
0
votes
2 answers

Is there a way to reload a single Partialview without loading the whole site? in asp.net Razorpages

Hello guys i wanted to ask if there is a way to reload a single partial after a is clicked instead of loading the whole site new. My site looks like this. My code This is how i load my partialview when i go to my main site.
flomue99
  • 87
  • 9
0
votes
2 answers

Asp Net Core. Multiple partial views in one page. Passing Models and Calling Actions

I'm a student and new to working with MVC Asp.net. I'm trying to create a booking system and would like to have all of the steps on one page, by using an accordion of sorts. I'm trying to understand if I will be able to achieve it by using several…
JUJU
  • 29
  • 6
0
votes
2 answers

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 controller: public IActionResult DelPlatform(int?…
0
votes
1 answer

Shared Partial View ActionResult Issue

I am trying to return the parent View when I call an ActionResult from within a Partial View. If I know the parent view I can just type in return View("Index");, but I can't because their could be multiple parent views as this partial view is…
Allensb
  • 260
  • 3
  • 13
0
votes
2 answers

The view or its master was not found or no view engine supports the searched locations - Server Error in / Application

Error like:The view 'Error' or its master was not found or no view engine supports the searched locations. The following locations were…
0
votes
1 answer

Pass viewmodel to ajax controller action that returns partial with that model?

I have a view that is strongly typed. Inside this view i have jqueryui tabs, that when clicked call my Controller and return a partial view ("#tab0").load('@Url.Action("ProfileImage", "User")'); public ActionResult ProfileImage() { …
billy jean
  • 1,399
  • 4
  • 25
  • 45
0
votes
1 answer

Layout is not loading with PagedListPager and partial view in MVC

I am using PagedListPager for pagination in MVC. I have a normal view and loading partial view for load grid section. First time it's working fine but second time when user click on page number it's loading data properly but layout is not…
0
votes
1 answer

dynamically render partial view on _layout.cshtml mvc 3

I want to display different navigation links based on the page that is loaded in my _layout.cshtml file. I thought about checking the url and just calling Html.RenderPartial within an if block but that seems clunky. Is there a way to control this…
Christopher Johnson
  • 2,629
  • 7
  • 39
  • 70
0
votes
1 answer

How to change the color of a button and its text, from partial view to a normal view?

Good afternoon programmers! Excuse me I’m trying to change the color and the text of a button of my problem is as follows: In a view several courses are displayed, when you click on the preregister button of some of them shows me a modal and inside…
0
votes
1 answer

conditionally add elements to jquery array from partialview

I am loading one of several partialviews depending on a selection that's made. Inside those partial views I need to capture all of the form elements that are included on that partialview inside a jquery array. currently I'm using this: var…
0
votes
2 answers

return partial view from async method

I've an async action method that return a partial view. this action method called from a function with ajax. my problem : when this method invoked every thing looks good except returned partial view. I got error 500. this is my action method Code…
Cawboy
  • 123
  • 2
  • 8
0
votes
1 answer

How do I render my partialview inside my main view or can I update the values in another way?

I have the following problem: So I built a search function for an OrderId in Nopcommerce and I want to update two values (Buyer Name) and (Purchase Reason) in a table in my main view instead of how it is now, where I render them in a partial view…