I've upgraded our project from being a website to a web app and imported to VS2k10.
I've added the following references:
System.Web.Abstractions
System.Web.MVC
System.Web.Routing
...
Changed target framework to 4.0...
Added a controller 'HomeController.cs'... This now works in the development server but NOT in IIS 7.0
Windows Serv...
I am using sql server 2005
but having error message on
_sessionFactory = configuration.BuildSessionFactory();
What is wrong and how can I correct it?
My Hibernate.cfg.xml
<property name="connection.driver_class">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.MsSql200...
I have a popup where a user is asked to act on something (accept or decline). My goal is that in this case they can have more than one of these pending items, so after they act on one, it refreshes the popup data with the next pending item.
It works, except there is one error. Error: 'id' is null or not an object on form submit. The ...
I have an existing asp.net web application that I'm updating to include some MVC pages. I have successfully upgraded the web app to recognize my MVC controllers/views/... I can even get my test page to display correctly: hooray!
However, I am having trouble figuring out how to add a test project so that I can add my unit tests for the...
I know there are a lot of threads here already on the repository pattern but somehow I feel my question is a little different. May be because yesterday was the first time I heard of the word POCO.
My question is this--usually, I have add and save methods in my business entities. Say I am writing a Q/A site, and I have the following e...
I'll give a very simple example:
at the moment I have to write like this:
<% Html.RenderPartial("hello", new HelloInput { Name = "Jimmy" } ); %>
I would like to be able to like this:
<%=Html.Hello("Jimmy") %>
So I would like to know how create this helper:
public static string Hello(this HtmlHelper helper, string name)
{
retu...
This doesn't make any sense to me.
Look at this ViewModel:
public class SelectService
{
[Required]
public int? SelectedServiceId { get; set; }
}
Look at this Action:
[HttpPost]
public virtual ActionResult SelectService()
{
TryUpdateModel(WizardContainer.SelectService, "SelectService");
TryValidateModel(WizardContaine...
I'm using asp.net mvc 2 with C# and DataAnnotations.
The situation is this: I have a custom control that is strongly typed against a model class. This control is displayed on the view several times but with differing property values, such as headings (Ex: Question 1, Question 2, Question 3, etc.. are all headings). I can write a custom...
I'm working on a solution to part of my companys site that is done in 2 different languages. My part of the project is in ASP.NET, and the login portal is in a different language.
We pass authentication credentials by storing login information in the database on the portal page and then sending a corresponding token to the URL in the ...
I'm building an ASP.NET MVC 2 intranet application in which users will upload data files. If a file is an excel spreadsheet, the user should be given the option to select which worksheet they would like to import. Some of these files can be very large, so will be imported asynchronously. But it would be great to grab a list of the worksh...
I read on several places that ASP.NET MVC uses "conventions over configuration".
I specifically read JohnnyCoder's post about this issue where he states about a specific convention (the view's name that is returned by a controller) that:
Unless you are familiar with this convention and you adhere to it, the code can be a little co...
Here is what I would like to express by Razor:
<b>@parameterMapping.Title</b> (Category: @parameterMapping.Category.Title, Regexp: @parameterMapping.Regexp)
But to make it parseable I have to write it this way:
<b>@parameterMapping.Title</b> <text>(Category: </text> @parameterMapping.Category.Title <text>, Regexp:</text> @parameterMa...
Hi, i am trying to move my business logic out from the controllers and into their own services. I have setup my controller like so:
public class AccountController : Controller
{
private readonly IAccountService _accountService;
public AccountController(IAccountService accountService)
{
_accountService = accountSer...
I am looking for a text editor for my asp.net mvc project. I was able to find a lot of text editor out there works pretty well.
What I am looking for is a editor that accept only regualr character like "I am a superman".
I do not want to save "<p><strong>I am a superman</strong></p>" into my SQL table since I have to show it thru textbo...
Hi, I'm developing a MVC2 application and using Forms Authentication on it.
The scripts, images and styles are all blocked to unlogged users and, consequently, the login page looks awful.
It works well local, the problem is when I publish to the server.
Does anyone has any idea WHY????
PS: The server IIS is version 7.5
My Web.config...
Given the following code which is extremely generic, I was hoping someone could tell me a bit about what is going on behind the scenes...
[HttpPost]
public ActionResult Load(Guid regionID, HttpPostedFileBase file)
{
if (file.ContentLength == 0)
RedirectToAction("blablabla.....");
var fileBytes = new byte[file.ContentLen...
There's so much I'm enjoying with asp.net MVC 2...but sometimes I feel like I'm trying to find a needle lurking in that haystack by beating it with a stick.
So. I have a list of objects. I have a strongly-typed view, which lists those objects. I have data annotations coming back just lovely, and all is well and good.
Now I want to...
Hello,
This must be a trivial question to some, but I haven't found any actual information about this.
I have an ASP.NET MVC web application. As I like to write reusable code, I'd like to put my Controllers into a separate library assembly and reuse them across multiple web applications.
The question is, how can I tell ASP.NET MVC tha...
The code that gets generated by Entity Framework 4--mainly the AddTo and Create methods--should I be using those directly? I'm trying to understand the Create method. The CreateDinner method (in NerdDinner) for example is this:
public static Dinner CreateDinner(global::System.Int32 dinnerID, global::System.String title, global::System...
I've used quite a bit of the Telerik RadControls for AJAX, and though I've been pretty happy with the controls, I've found that the performance has been less than stellar over traditional controls.
I'm wondering what the performance implications would be (that you might know of) with regards to the MVC Extensions over traditional jQuery...