TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sandeep Shekhawat
912
859
906.8k
System.Web.Mvc.HtmlHelper error?
Jun 7 2011 11:14 PM
I have a modal GuestResponse like:
namespace MyMvcApp.Models
{
public class GuestResponse
{
public string Name { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public bool? WillAttend { get; set; }
}
}
I have create strongly-typed view:
and add View Data Class
MyMvcApp.Models.GuestResponse
in the view i have like this:
<% using(Html.BeginForm()) { %>
<p>Your name: <%=
Html.TextBoxFor(x => x.Name)
%></p>
and here i get a error like:
Compiler Error Message:
CS1061: 'System.Web.Mvc.HtmlHelper<MyMvcApp.Models.GuestResponse>' does not contain a definition for 'TextBoxFor' and no extension method 'TextBoxFor' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<MyMvcApp.Models.GuestResponse>' could be found (are you missing a using directive or an assembly reference?)
Line 9:
<h1>RSVP</h1>
Line 10: <% using(Html.BeginForm()) { %>
Line 11: <p>Your name: <%= Html.TextBoxFor(x => x.Name) %></p>
Line 12: <p>Your email: <%= Html.TextBoxFor(x => x.Email) %></p>
Line 13: <p>Your phone: <%= Html.TextBoxFor(x => x.Phone) %></p>
How can solve this Please help me? where i am wrong.
Reply
Answers (
0
)
Playback a sound in two or three devices at the same time
How can you sort the elements of the array in descending order? if yes then how?