Hi,
is it possible to generate cross-application action links using the HTML helper class?
I have the following (both are separate VS2008 projects):
http://mainwebsite/
http://mainwebsite/application
I would like to generate a link IN the /mainwebsite/application/ project TO /mainwebsite/. Is this possible? Or should I just hardcod...
I'm trying to figure out how to conditionally set a routeValue which is optional.
I have
<%= Html.RouteLink("<<<","Products",new { page=(Model.Products.PageIndex) }) %>
If a visitor clicks on a "category" I only show products of that category, but if there is no "category" I show all products.
These 2 URLs would be valid:
/Product...
Suppose I have the following route.
routes.MapRoute("SomeRouteName"
, "{node}/{action}/{destination}"
, new { Controller = "Document"}
, new { Action = "Transfer|Destine|Remove" }
);
When "/X/Destine/Y" URL is entered, the "Destine" action fires and renders a view, which contains the following:
<%= Url.Action("Transfer") ...
Sorry this is my first question, don't know ho this works and i'm quite new to ASP.NET MVC. My action is:
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult SearchResults(PersonSearch search, int? page)
{
// Assign the search results to the View
ViewData["Results"] = new PaginatedList<Person>(
...
Hello
How would a constraint for a route look like that needs to be in the format:yyyy-MM-dd hh:mm?
especially with the space there?
I got @"\d{4}-\d{2}-\d{2}" so far, but not sure about the rest
How's it done?
/M
...
I have a page with jquery tabs in which the user can update their Profile, Password, General in each tab.
When a user update the details in "General" tab, the post action will be called and it should retain the "General" tab back.
It can be accessed directly by calling like http://localhost:8742/User/Settings/10#General. In the url 10...
All,
Getting to grips with ASP.NET MVC. So far, so good, but this one is a little nuts.
I have a view model that contains a dictionary of attributes for a hyperlink, used like this:
menu = model variable
Html.ActionLink(Html.Encode(menu.Name), Html.Encode(menu.Action), Html.Encode(menu.Controller), menu.Attributes, null)
The proble...
Seems like a straitforward question but I can't quite figure it out myself...
I have an actionlink like so
Html.ActionLink( "Test", "test", new { q = "search+twitter" } )
This produces a url string as follows
http://myserver/test?q=search%2Btwitter
But i would like to preserve the plus sign (which i assume is being UrlPathEncoded) ...
Is there a method to extract the area, controller, action, and querystring from a URL in ASP.NET MVC? Don't want to reinvent the wheel implementing my own if there's already a way to do it.
Thanks!
...
// html
<% using (Html.BeginForm("MyAction", "MyController",
new { id = ViewContext.RouteData.Values["id"] },
FormMethod.Post,
new { enctype = "multipart/form-data", class="myForm" }))
{ %>
<input type="file" name="blah" />
<% } %>
// script
$container.find('.myButton')....
the very famous actionlink:
<%: Html.ActionLink("Back to List", "Index")%>
Now, this link is in my Details view. The Index view is a search page. The url of that looks like this:
http://localhost:50152/2011-2012/Instelling/Details/76?gemeente=Dendermonde&postcode=92**&gebruikerscode=VVKSO114421&dossiernr=114421%20&o...