Questions tagged [url-action]
36 questions
0
votes
1 answer
Render image from byte[] that is not in the DB in ASP.NET MVC3
This is a variation on a question that has been asked here several times. One example: Display an image contained in a byte[] with ASP.Net MVC3. The question is how to render an image from a byte array.
In all those questions, there is an Action…

adimauro
- 233
- 1
- 12
0
votes
1 answer
How add multiple actions In URL?
How can I add more than one action to a URL? As I described in the title, I want to add more than one action to a URL. How do I do that?
As a further clarification, I define actions for some parts in an HTML file, and by setting an action, I handle…

Amir Abouei
- 126
- 8
0
votes
0 answers
.Net Core Unit Testing With Url.Action
I am currently running unit tests on a controller that utilizes Url.Action to get the absolute path of two different routes. I am using Moq to set up the mock Action. The test is currently failing with the message 'Object reference not set to an…

ShaggyMunky
- 1
- 2
0
votes
1 answer
Is it possible to send Model data from a View to a Controller that is not the Controller for that View?
I could not find the similar question yet, so I decided to ask it here.
I relatively new to MVC and may have some incorrect wording in my question, and I'm just wondering if that is possible to do it at all?
Usually, we are dealing with…

gene
- 2,098
- 7
- 40
- 98
0
votes
3 answers
MVC keep navigation active when redirect to "Add" page
I've created some pages using "Gentelella Alela" template, when I create pages, it has the ability to turn navigation active (with 'current-page' class) based on controller and action name:
I'm adding "Add" action in RoleController, when I redirect…

Jeff Tung
- 99
- 2
- 10
0
votes
1 answer
Dynamically generate api url parameters in jquery url action to populate dropdown list
I have a View in my VS project that has three dropdown lists, 2 of which are cascading and need to populate on the parent control's change. The workflow I have works great for static url calls, but I need to dynamically add the data and I am not…

user2653814
- 23
- 3
0
votes
1 answer
jQuery .get works inline but not in an external file
I have some jQuery where I'm loading HTML into a document using a .get, like this:
var url = '@Url.Action("beneficiary")';
$.get(url, function (response) {
$('#beneficiaries').append(response);
});
It works perfectly when the script is inline,…

Robert M.
- 575
- 5
- 17
0
votes
2 answers
Error in sending parameters to controller through @Url.Action in JQuery
I am working on an MVC project and I was trying to send some parameters to my controller in JQuery using @Url.Action.
HTML code:
JQuery Code:
…

Hanady
- 779
- 2
- 15
- 38
0
votes
2 answers
Why is my AJAXoned Action's return not being seen as successful by the caller?
In my ASP.NET MVC app, I've got this AJAX call in my View's script section:
$(".ckbx").change(function () {
. . .
$.ajax({
type: 'GET',
url: '@Url.Action("GetUnitReportPairVals", "Home")',
data: { unit: unitval, report:…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
0
votes
2 answers
Can't style an anchor with an image
According to this answer, I'm supposed to be able to style my anchor tag as follows.
However, I noticed that it doesn't work as expected…
user1675891
0
votes
1 answer
Error in Contact form
I need to show in the Comment text area the id of the property about it are consulting, I took it from the view Details where have a button "Consult".
In the Details view:

vicky_864
- 57
- 8
0
votes
1 answer
PagedList MVC Html Helper, add key/value pairs to Html Helper
Parent View:
var pagingModel = new Watchlist_Web.Models.ViewModel.PagingPartialViewModel();
pagingModel.PagedList = Model;
pagingModel.UrlAction = "AdminIndex";
Dictionary parameters =…

blgrnboy
- 4,877
- 10
- 43
- 94
0
votes
2 answers
Url.Action, Where does the parameter come from
I have this javascript code in the view:
function getUrl(id) {
var url = "@Url.Action("Product", "Product")/" + id;
return url;
}
and this is the routing config:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name:…

VahidNaderi
- 2,448
- 1
- 23
- 35
0
votes
1 answer
How to debug c# code being called by JqGrid?
I have some code like this:
@{
ViewBag.Title = "Home";
var grid = new JqGridHelper("projects",
dataType: JqGridDataTypes.Json,
methodType: JqGridMethodTypes.Post,
pager: true,
rowsNumber: 10,
sortingName: "Id",
sortingOrder:…

Jimmy T
- 447
- 6
- 14