hi all,

For some reason one routing rule replaces the other. Meaning whenever
I try to evoke MyView(id) func SearchResult(categoryId) is executed
instead. Any ideas of how to fix this?

thanks
eyal

I have the following routing rules:


            rules.Add(new PatternRoute("/<controller>/<productName>/
<categoryId>/")
              .DefaultForArea().IsEmpty
              .DefaultForAction().Is("searchresult")
              .Restrict("categoryId").ValidInteger);

            rules.Add(new PatternRoute("/<controller>/<title>/<id>/")
                .DefaultForArea().IsEmpty
                .DefaultForAction().Is("myview")
                .Restrict("id").ValidInteger);

Relating Url generated in view:

Evokes SearchResult(categoryId) func
$Url.Link($Product.Name, "%{controller='products',
action='searchresult', params={categoryId=$Product.Id, productName=
$Product.Name}")

Evokes MyView(id) func
$Url.For("%{controller='products', action='myview', params={id=
$row.Id, title=$row.title}")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to