I have a custom handler I've written that executes a custom action based on a parameter, for example:
/action/option1
would execute the action handler with option1. I can have any number of options for the parameter...
however this action is a custom handler, NOT an mvc controller, because I'm returning a plain text (possibly moving t...
Here's my dilemma: I have two types of routes which are semantically very different, and should go to different controllers.
ny/new-york/brooklyn/cleaners # should go to a list of cleaners for a neighborhood
ny/new-york/cleaners/mrclean # should go to an individual cleaner's page
Note that "brooklyn" and "cleaners" here are just exam...
Hi,
Previously I was using Rewriter.net to rewrite my urls. I used a format like:
<rewrite url="~/(.*)_p(\d+).aspx\??(.*)" to="~/product.aspx?pid=$2&$3"/>
So a page url would look like ~/productname_p21.aspx with an optional querystring.
I'm upgrading the application to ASP.NET 4 and I would like to use the URL routing in System...
I have downloaded sample from here (Demo)but when i deploy it on my Godady server it gives me error
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the...
Hello Everyone,
i have following two routes registered in my global.asax file
routes.MapRoute(
"strict",
"{controller}.mvc/{docid}/{action}/{id}",
new { action = "Index", id = "", docid = "" },
new { docid = @"\d+"}
);
routes.MapRoute(
"default",
...
Say I am rolling out a CMS. Each user gets their own page at domain.com/username/index.php. At the moment I'm considering having a new account create a folder at said location and make an index file like so:
<?php
$username=blahblah;
require("../indextemplate.php");
?>
Which would work fine. Everyone gets their own custom pages and su...
Hi,
I have the followed Rails 3 routes:
Hello::Application.routes.draw do
resources :blogs do
resources :articles do
resources :comments
end
end
end
By raking them, we can find:
GET /blogs/:blog_id/articles/:article_id/comments(.:format) {:action=>"index", :controller=>"comment...
I have Exam controller.
In routes.rb there is "resources :exams"
In controller there are REST-like generated methods.
I want to add my own method there:
def search
@exams = Exam.where("name like ?", params[:q])
end
In view file:
<%= form_tag(search_path, :method => "post") do %>
<%= label_tag(:q, "Szukaj: ") %>
<%= text_fie...
How can I pass two querysting parameters in URL routing using ASP.NET 4.0?
I have gone through many articles, but everywhere it shows only one parameter.
I'd like the display URL to be:
http://www.mywebsite.com/reports/1-this-is-my-first-report
The first parameter is ID: 1
The second is Name: This is my first report
I am trying fol...
Hi all
I am working on a web crawler. I am using the Webbrowser control for this purpose. I have got the list of urls stored in database and I want to traverse all those URLs one by one and parse the HTML.
I used the following logic
foreach (string href in hrefs)
{
webBrowser1.Url = new Uri(hre...
I have an application that stores database IDs in session while editing several pages of data. When the user opens multiple tabs (or windows), data is being overwritten because the IDs are getting crossed up. I completely understand the problem, and was going to fix this by taking the IDs out of storage and passing them around in query s...
Question:
I just stumbled upon:
http://icculus.org/~chunky/writing/inetd
I realized it removes the http://www in front of the URL.
How is that done?
I am not aware of URL-rewriting being able to do that, or not ?
...
I have the following routes in my application.ini:
resources.router.routes.user.route = "users/:id/*"
resources.router.routes.user.defaults.controller = users
resources.router.routes.user.defaults.action = profile
resources.router.routes.user.reqs.id = "\d+"
resources.router.routes.page.route = "pages/:date/*"
resources.router.routes.p...
I'm working with ASP.NET MVC but this really applies to any MVC framework. I understand that one of the benefits of an MVC framework is the construction of "pretty" urls. I have kept my small application simple thus far and most routes use the normal convention of: controller/action/id. However, now I've created a simple page that wil...
I've recently updated a website I work on to Wordpress 3.0. Something strange has started happening, where now the www. has dissapeared from the URLs, and if you add the www. to the URL (a good portion of the existing hardcoded links have it) then it redirects you to the home page URL.
Any ideas what could be causing this?
My .htaccess...
I need to get RoutData by given URL string in ASP.NET MVC application.
I've found the way that I need to mock HttpContextBase based on my URL string and then pass it to RouteTable.Routes.GetRouteData() method in Route Parsing (Uri to Route) thread.
How to mock HttpContextBase to retrieve RouteData by URL string using RouteTable.Routes....
Hello,
What is best solution to serve ASP.NET web pages without aspx extension? I want to make http://www.mydomain.com/mypage instead of http://www.mydomain.com/mypage.aspx
I use .NET 2.0 and IIS6
...
I ve seen in twitter, i can get a user view page by just typing in the url say http://twitter.com/pandiyachendur. How to do the same with asp.net mvc? I dont know how twitter does it?
...
HI All, I got a question about the URL Routing feature in .Net 4.0
My URL the I want to rewrite is : www.mysite.com/counties.aspx?id=12
I could make it work like that : www.mysite.com/12/egypt
But I want it to work without passing the id of the country in the query to look like this www.mysite.com/egypt
So ,I want to know how can I p...
I am running into the following issue:
Our members have a desire for personalized sites directly from our primary domain in the form of http://www.example.com/membername. I am looking at possibly solutions in two ways but neither are ideal (will be explained below).
Method 1 - ?Member=
In this method, I simply create a custom URL and...