I'm trying to create a routing prefix that would be default.
http://localhost/heb/mycont would leave to the Hebrew page, while
http://localhost/mycont would lead to the English page.
Router::connect('/:language/mycont',array('controller'=>'contname','action'=>'index'),array('language'=>'[a-z]{0,3}'));
This code allows me to use 0-3 ...
I have an action taking two GUIDs:
public class MyActionController : Controller
{
//...
public ActionResult MoveToTab(Guid param1, Guid param2)
{
//...
}
}
I would like the following URI to map to the action:
/myaction/movetotab/1/2
...with 1 corresponding to param1 and 2 to param2.
What will the route look like, and ...
This should be simple, but alas...
I've set up an Admin area within my MVC 2 project (single project areas). I've created a couple controllers and their respective view folders. In the AreaRegistration.RegisterArea method, I've specified that I want the default controller to be "Dashboard":
public override void RegisterArea(AreaRegis...
I have deployed an ASP.NET MVC application following the article How to: Deploy an ASP.NET MVC Application. The index page for the app pulls up correctly rendering images, loading JavaScript and CSS. Unfortunately, none of the links work. I thought this Stack Overflow question ASP.NET MVC deployment to IIS 5/6 with Virtual Directory woul...
Hello reader,
with the following routes I try to achive the goal, that I can present static resources like terms of use, imprint and so on in different languages using different urls.
I defined two example routes for my imprint like that:
map.imprint ':lang/impressum', :controller => "statics", :action => "imprint", :requirements =...
Do the parameter names in ASP.NET MVC routes need to match those in their corresponding actions, and if so, why?
...
I am learning MVC and I need to understand why it doesn't work the way it should.
Here is my routing :
public static void RegisterRoutes(RouteCollection routes)
{
// Note: Change the URL to "{controller}.mvc/{action}/{id}" to enable
// automatic support on IIS6 and IIS7 classic mode
//http://localhos...
I use the latest version of ASP.Net MVC 2 RC.
My question is, how do I redirect from one action that's in the "Blog"-area to the index-action in the home-controller that exists in the "root" of my application (no area)?
I tried:
return RedirectToAction("index", "home");
but this redirects to /Blog/home, where Blog is the name of my ...
I am attempting to create a custom route in rails and am not sure if I am going about it in the right way. Firstly I have a RESTful resource for stashes that redirects to mystash as the controller:
map.resources :stashes, :as => 'mystash'
site.com/mystash goes to :controller => 'stashes', :action => 'show'
Which is what I want. Now ...
I have an ASP.NET WebForms application that I'm trying to switch to MVC for new development. I'm generally following this tutorial plus Google and Stack Overflow. The setup has been "easy", but for some reason I can't seem to get the first MVC controller/view to appear.
My first thought was that I had a problem with the routing, so I in...
Because Google Maps API is not available in Israel (see here) I want to use OpenStreetMap. I'm confused by all the different ways to do geocoding, i.e. finding lat,long for an address.
I'm also looking for the best way to do routing, i.e display a route between two locations, using OSM.
I'm looking for JavaScript on the client and .Ne...
Please help me. I am quite new to kohana. How best to do so the controller was chosen based on the subdomain. For example:
www.site.com -> Controller: siteroot. Method: run
admin.site.com -> Controller: adminsite. Method: run
moderator.site.com -> Controller: moderatorsite. Method: run
director.site.com -> Controller: directorsite. Meth...
Hi together,
I have switched to Ruby on Rails and my current problem is to reroute
the old contents like XXX/dummy.html or XXX/dummy.php in RoR.
What exactly is the best solution for
isolated content (XXX/onlyinstance.html)
content which has a internal structure like XXX/dummy1.html, XXX/dummy2.html
http://guides.rubyonrails.org/...
How things works (or should):
We have lots of clients apps set on IIS but Apache is the one that receives all conections (from port 443) and redirect them to the corresponding port on the IIS server.
The problem is: our application is building the URLs based on the IIS port (final port) instead of Apache's (default 443) one, even tho t...
I've been trying to figure out why my views are returning 404 in my staging environment, but not my development environment.
Windows Server 2008 R2
IIS 7.5
MVC 2 Beta definitely installed.
The first Route entry in my Global.asax is as follows:
routes.MapRoute(
"FindStore",
"FindStore",
new...
My skills are failing me, and I know I've seen the code around for this but I can't find it.
What's the quickest way to take any arbitrary URL, run it through your asp.net mvc routing system, and come out with a reference to a controller instance on the other end?
For example, code execution is inside some arbitrary controller method. ...
Say I want to display user details like so:
http://www.mysite.com/user/1
I set a route up like so:
routes.MapRoute("UserDetails", "user/"{id}",
new { controller = "User", action = "Details" });
Then my controller:
public ActionResult Details(int id)
{
User currentUser = _userRepository.GetUser(id);
if (currentUser == nul...
My example:
I have a View that presents a set of div tags that has content populated from the datamodel.
[Multiple of these, with different location_id, naturally]
<div>
<a name="location_id"></a>
Content
</div>
Now, I have a form [in its own view] that submits content that adds another record to the datamodel. Once the reco...
I'm developing a Rails app that by default sets up user accounts to a subdomain of their choosing. As an option, they will be able to map their own full domain to their account.
So far this is how I have things set up. I am using subdomain-fu to power the routing:
# routes.rb
map.with_options :conditions => {:subdomain => true} do |app...
This is my routing:
routes.MapRoute(null,
"shelves/{id1}/products/{action}/{id2}",
new { controller = "Products", action = "List", id1 = "", id2 = ""});
The thought is that you can do something like this:
http://server/shelves/23/products/edit/14
And be able to edit product 14 on shelf 23. Checking it with Route Debugger, t...