When I run it however I get this result: CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Form' and no extension method 'Form' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive
or an assembly reference?)
In the object browser I can see the HtmlHelper object but it does not contain any functions for Form, TextBox, or Password. Here is the url I used to download ASPNETExt.exe from:
dnoxs
Member
2 Points
1 Post
Re: Problem with MVCToolkit
Jan 16, 2008 04:59 PM|LINK
Hi
I have a similar problem. I have just installed VS2008 Team System Development Edition. I then installed ASPNETExt.exe.
After starting VS2008 I attempt to do the following:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Costar.Focus.Web.Portal.Views.Security.Login" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<h2>Login</h2>
<% if (ViewData["ErrorMessage"] != null)
{ %>
<%= ViewData["ErrorMessage"] %>
<% } %>
<% using (Html.Form("Authenticate", "Security"))
{ %>
Username: <%= Html.TextBox("username") %><br />
Password: <%= Html.Password("password") %><br />
Remember Me: <input type="checkbox" id="rememberMe" name="rememberMe" checked="checked" value="checked" /><br />
<%= Html.SubmitButton() %>
<%= Html.Hidden("returnUrl", "/") %>
<% } %>
</asp:Content>
When I run it however I get this result: CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Form' and no extension method 'Form' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)
In the object browser I can see the HtmlHelper object but it does not contain any functions for Form, TextBox, or Password. Here is the url I used to download ASPNETExt.exe from:
http://www.microsoft.com/downloads/details.aspx?FamilyId=A9C6BC06-B894-4B11-8300-35BD2F8FC908&displaylang=en
Any help would be appreciated.
MaskPZ
Member
2 Points
1 Post
Re: Problem with MVCToolkit
Jan 21, 2008 09:34 PM|LINK
Hi
I have the same problem of dnoxs.
How can we fix it?Any ideas?
Thank you!
rodrijp
Member
2 Points
1 Post
Re: Problem with MVCToolkit
Dec 01, 2008 11:03 AM|LINK
I have the same problem. When i revise de web.config file, you must have added the System.Web.Mvc.Html namespace.
<namespaces>
<add namespace="System.Web.Mvc"/>
<add namespace="System.Web.Mvc.Ajax"/>
<add namespace="System.Web.Mvc.Html"/>
<add namespace="System.Web.Routing"/>
<add namespace="System.Linq"/>
<add namespace="System.Collections.Generic"/>
</namespaces>