I wrote a site using ASP.NET MVC, and although it is not completely SEO optimized at this point I figured it is a good start. What I'm finding is that when I use Google's Webmaster Tools to fetch my site (to see what a GoogleBot sees) it sees this.
HTTP/1.1 200 OK
Cache-Control: public, max-age=1148
Content-Type: application/xhtml+xml; ...
I need to render a URL for a JavaScript search that I am doing. Unfortunately Url.Action renders not only the action but the current id. This occurs when presently on page utilizing the action with the id.
To illustrate Url.Action("List", "Org"); will first render Org/List from which I can append an org to be listed. However, after the ...
I've tried many different ways to pass the selected items to the multiselect list with no luck. Finally, I tried this, which I think should display all the items as selected and still nothing in the list is selected.
public MultiSelectList Companies { get; private set; }
Companies = MulitSelectList(subcontractRepository.SubcontractCom...
We just recently upgraded our application and noticed that we're getting runtime errors on all of our Html.ValidationMessages and Html.ValidationMessageFor. There error is: The given key was not present in the dictionary. We've been passing the modelName/expression and it was working fine until the upgrade. I also checked out the bre...
Im having a value in ViewData, lets say htmlhelper.ViewData["myData"]="some";
And in partial page I can overwrite the myData's value.
But when I using the Html.RenderAction() and call a partial page.
In the same partial page htmlhelper.ViewData["myData"] is null.
...
I have the following url I need to support in my asp.net mvc project for a while.
http://www.example.com/d.aspx?did=1234
I need to map this to this url.
http://www.example.com/Dispute/Detail/1234
I have already looked at the following information.
http://blog.eworldui.net/post/2008/04/ASPNET-MVC---Legacy-Url-Routing.aspx
http://s...
We are working with an asp.net mvc app that is shared by multiple clients. We need the urls to include the clients url friendly name. For example:
domain.com/clientName/controller/action/id
This below appears to be working when it comes to routing, but the "clientName" is not generated correctly for the action link helpers.
_routes....
How can I change this DropDownList declaration so that the disabled attribute is enable/disabled conditionally?
<%= Html.DropDownList("Quantity", new SelectList(...), new{@disabled="disabled"} %>
non-working example:
<%= Html.DropDownList("Quantity", new SelectList(...), new{@disabled=Model.CanEdit?"false":"disabled"} %>
p.s. addin...
how-to enable Client-Side validation for a ordinary textbox in ASP.NET MVC.
...
I'm trying to use the built in ASP.NET MVC 2 client side validation on a Select List like the following:
private SelectList _CategoryList;
[Required(ErrorMessage = "Category Required")]
[System.ComponentModel.DataAnnotations.Range(1, double.MaxValue, ErrorMessage = "Please Select A Category")]
[DisplayName("Cate...
Hi,
What is a good and simple wysiwyg text editor to use with asp.net mvc I only need the bold and insert a link functionalities.
Thanks :)
...
I have recently been getting this error on my ASP.NET MVC project that uses the Entity Framework:
At least one SSDL artifact is required for creating StoreItemCollection
The error occurs when I try to query the database in a controller action. Has anyone seen this error before? It only occurs every once in a while for me but I am...
[TypeLoadException: Could not load type 'System.Web.Mvc.AreaRegistration' from assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
HemelMvc.MvcApplication.Application_Start() in D:\@Hemel\HemelMvc\src\HemelMvc\Global.asax.cs:72
[HttpException (0x80004005): Could not load type 'System.Web.Mvc...
Hi,
I'm getting "InvalidCastException" (occurred in System.Data.Linq.dll) in my function:
public User GetUserByKey(Guid key)
{
return usersTable.FirstOrDefault(m => m.UserKey == key);
}
which is called here:
MembershipUser mu = Membership.CreateUser(user.UserName, user.Password, user.Email, null, null, true, Guid.NewGuid...
I am converting my website from Asp.Net Webforms to Asp.Net MVC. I want to redirect all my old .aspx files to drop the .aspx. I run IIS7 with the Url Rewrite module installed.
Example:
/about.aspx -> /about
The user will go to http://www.site.com/about.aspx and I want them redirected to http://www.site.com/about.
How do I do this u...
Hi
I have a strongly typed partial view that populates all the Records from Search table.
Now i have a textbox to enter name & a button to filter the records that can match a name.(Like Search page).
Can anybody provide code sample for this scenario?
My Main Page loads particular view based on the radiobutton selection(Search or Inqu...
I want in my asp.net application is to create a schedule.The events should be dragged from the treeview and dropped onto the calendar control to create the schedule.What i want is that someone could suggest what is the best calendar control available in the market to do so.My budget is 300$.If there is some other way of achieving this th...
When I first heard about ASP.NET MVC, I was thinking that would mean applications with three parts: model, view, and controller.
Then I read NerdDinner and learned the ways of repositories and view-models. Next, I read this tutorial and soon became sold on the virtues of a service layer. Finally, I read the Fluent Validation documentati...
anybody knows how to mock Url.Content("~") ?
(I'm using Moq)
...
Hello
I have an app with 3 "layers", first "datalayer", 2nd "businesslayer" and 3rd is the asp.net mvc site. And I'm trying to add forms authentication in the proper way.
Should I somehow configure it to use the business layer? That gets/adds/updates user that is a part of the authentication to be?
And in which project shall I add th...