urlhelper Questions
8
Solved
I need to generate some URLs in a model in ASP.NET MVC. I'd like to call something like UrlHelper.Action() which uses the routes to generate the URL. I don't mind filling the usual blanks, like the...
Excited asked 9/1, 2010 at 1:48
3
I try to access URL helper from inside a Module class. Here's my code :
module Station
class Plugins
@@plugins = [] unless defined?(@@plugins) && @@plugins.class == Array
class <&l...
Extender asked 10/6, 2012 at 10:57
4
Solved
I want to use IUrlHelper through dependency injection to be able to use its functionality to generate uris for different rest endpoints. I cant seem how to figure out how to create a UrlHelper from...
Exsiccate asked 25/6, 2015 at 19:48
4
Solved
I have a performance issue with a fairly simple ASP.MVC view.
It's a log-on page that should be almost instant, but is taking about half a second.
After a lot of digging it looks like the problem...
Fluoric asked 10/8, 2012 at 10:49
4
Solved
Writing
@Url.Content("~/Something/Something.html")
in razor renders
/AppFolder/Something/Something.html
Is there a way to render the full URL like http://www.something.com/AppFolder/Somethi...
Blearyeyed asked 17/8, 2011 at 8:37
3
Solved
I need to be able to control the links being generated by my Url.Content("~") call to be able to accept a Slug in the beginning of the link. Basically the hosting URL will be behind a Load-balancer...
Sleuth asked 17/2, 2019 at 2:50
2
Solved
I'm working on creating a UrlHelper for a background worker to create callback urls, which means it's not part of a normal request where I could just ask for it through DI.
In ASP.Net 5 I could ju...
Officer asked 7/9, 2017 at 12:14
8
I tried:
class MyMailer
def routes
Rails.application.routes.url_helpers
end
def my_mail
@my_route = routes.my_helper
... code omitted
end
Also inside mailer:
include Rails.application....
Penetration asked 21/7, 2013 at 18:3
1
Solved
I'm rather new to ASP.NET Core, and right now I am trying to get a grasp on how UrlHelper works in general.
In my controller, I want to create an absolute URL to another action in the same control...
Redeemer asked 27/9, 2018 at 12:24
4
Solved
I have a method in the controller ApplicationsController, in which I need to get the base URL for an action method:
public ActionResult MyAction(string id)
{
var url = Url.Action("MyAction", "App...
Parabolize asked 3/12, 2013 at 11:18
5
Solved
Can anyone tell me why my redirect helper does not work the way I'd expect it to?
I'm trying to redirect to the index method of my main controller, but it takes me www.example.com/index/provider1/ ...
Polito asked 7/4, 2009 at 1:39
6
Solved
I ask a similar question here and Darin Dimitrov answer that we can't use Url helper like $.ajax({ url: '@Url.Action("Index")', . . . in separate js file so what is your suggestion to use Url helpe...
Britton asked 29/3, 2012 at 8:52
1
Solved
Looking at the msdn (UrlHelper.Route, UrlHelper.Link) they seem quite identical. Are there any reasons to use one or the other?
1
I am using the UrlHelper to generate an URL, however, I am getting the ArgumentNullException when I call the method Action(action, controller, route).
UrlHelper urlHelper = new UrlHelper();
if (!...
Videlicet asked 28/7, 2015 at 15:23
1
Is there any way for an ASP.NET application to be able to derive its url paths and hostname knowing its own routes within the context of a request going through reverse proxy/gateway?
When request...
Buoyage asked 9/12, 2013 at 20:5
2
Solved
I am developing a MVC 3 application for a corporate intranet site and I am having some issues with the URL helper sometimes not producing correct URLs. The application is being accessed through an ...
Stun asked 3/1, 2013 at 20:1
1
Solved
I have a static class that sends emails with links to certain pages of my site. That link is getting dynamically generated with this code:
UrlHelper urlHelper = new UrlHelper(HttpContext.Current.R...
Arsenic asked 9/8, 2013 at 16:3
1
Solved
I use NUnit and Moq libraries for unit testing.
I need to mock overloaded Url.Action(string, string, object, string), because my controller's action uses it to get an absolute url of an Action.
M...
Ulberto asked 6/3, 2013 at 21:43
1
Solved
I'm used to generating route URLs to other controller actions within an MVC controller action using something similar to below:
public class ApplicationController : Controller
{
public ActionResu...
Undrape asked 6/3, 2013 at 14:39
1
Solved
Is there any way I can do this?
Some of the benefits of bundling are:
Minimization
Gzip compression
The request has a token parameter for handling files versiones (cache).
In my site I use a l...
Marchall asked 29/10, 2012 at 15:2
1
Solved
Suppose I want to have a blog with Rails 3 on my website and it will be the only thing I have on it. I would like to use Rails to implement it but I don't like the URLs Rails produces. I would like...
Encephalograph asked 29/6, 2012 at 22:23
3
Solved
One of my controllers actions, one that is being called in an Ajax request, is returning an URL to the client side so it can do a redirection. I'm using Url.RouteUrl(..) and during my unit tests th...
Apple asked 23/3, 2009 at 17:43
2
Solved
I'm trying to create a link with Url.Action, which ends with a #something; I presume there's something in the route values to do this properly, but I couldn't find it with Google.
So far, I tried ...
Oatmeal asked 13/9, 2010 at 8:41
2
Solved
Background
I am trying to move business logic out from the controllers into their own services.
Controller
public class AccountController : Controller
{
private readonly IAccountService _accountSe...
Argillaceous asked 15/9, 2010 at 22:30
3
Solved
I'm trying to write a test for an UrlHelper extensionmethod that is used like this:
Url.Action<TestController>(x => x.TestAction());
However, I can't seem set it up correctly so that I ...
Scrutator asked 4/6, 2009 at 15:35
1 Next >
© 2022 - 2024 — McMap. All rights reserved.