'System.Web.Mvc.HtmlHelper' does not contain a definition for 'GridView'

Hi,

Using this article http://weblogs.asp.net/stephenwalther/archive/2008/06/24/asp-net-mvc-tip-8-create-an-asp-net-mvc-gridview-helper-method.aspx

i have created gridview based on that but, the error follows 

Compiler Error Message: CS1928: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'GridView' and the best extension method overload 'VMLBlogsite.Helpers.GridExtensions.GridView(System.Web.Mvc.HtmlHelper, System.Data.Linq.ITable)' has some invalid arguments Source Error: Line 8:

Simple Grid

Line 9: Line 10: <%= Html.GridView(ViewData.Model)%> Line 11: Line 12:
Note:  i use asp.net mvc beta.

0
Ambikaa
10/18/2008 12:43:00 PM
asp.net.3.5-extensions-preview 378 articles. 0 followers. Follow

2 Replies
893 Views

Similar Articles

[PageSpeed] 34

Hi, I didn't read the article, but from its url "create-an-asp-net-mvc-gridview-helper-method", I guess the gridview helper is something you have to write yourself taking the code in the article.

Simone


Want to learn more about ASP.NET MVC? Pre-order (USA or UK)"Beginning ASP.NET MVC" by Simone Chiaretta and Keyvan Nayyeri
0
simonech
10/18/2008 3:54:02 PM
Are you sure that your "ViewData.Model" implements "System.Data.Linq.ITable" interface?
Don't forget to click "Mark as Answer" on the post that helped you.
0
Augi
10/18/2008 9:08:30 PM
Reply:

Similar Artilces:

'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Calendar'
Hi, Please anybody tell me what this error. I use asp.net MVC Beta. This error showing in gridview too how to rectify it?Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Calendar' and no extension method 'Calendar' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) Source Error: Line 8: Line 9: Mvc Calendar 1: Simplest Calendar Line 10: <%= Html.Calendar() %> Line 11: Line 12:   &nbs...

Error 1 The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\asse
Once I build project. I encounter this error. Does someone experience this error?Error    1    The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.6.0.0__31bf3856ad364e35\System.Web.Extensions.dll'    D:\Source Code\Linq_Lesson5\Default.aspx    1    1    D:\Source Code\Linq_Lesson5\  It appears tha...

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
on my localhost, everything is working just fine, developing a few hours... then i publish to another server (windows server 2003)...and suddenly my website is broken. i could track i down to a scriptreference in my scriptmanager - which used to work perfectly.now i don't know where it went wrong - because i developed several things, including the addition of autocomplete textbox with the control toolkitbut even after removing all the code for the autocomplete textbox, the problem wasn't solved. i seem to be the first one to have this problem, because google doesn't return anythi...

'System.Windows.Forms.DataGridView' does not contain a definition for 'databind' and no extension method 'databind' accepting a first argument of type 'System.Windows.Forms.DataGridView' could be foun
 Error    1    'System.Windows.Forms.DataGridView' does not contain a definition for 'databind' and no extension method 'databind' accepting a first argument of type 'System.Windows.Forms.DataGridView' could be found (are you missing a using directive or an assembly reference?) how to solve this Are you using a web applictaion or windows application. If web aplictaion then you should not use 'System.Windows.Forms.DataGridView'  Try using system.web.ui.control.datagridVikram www.vikramlakhotia.comPlease ma...

MVC BETA: 'SubmitButton' is not a member of 'System.Web.Mvc.HtmlHelper'
I created a new MVC BEta Project and copied over a few views and I get this error now:'SubmitButton' is not a member of 'System.Web.Mvc.HtmlHelper' It's not even listed as an option for me - what the hell? Anyone know what I am doing wrong here? I believe this HtmlHelper is only availbe in the Futures assembly.  The Futures assembly is no longer referenced automatically.  It is a seperate download. It looks like this HtmlHelper wasn't doing a whole lot for you in this case anyway.  Why not just write: <input type="submit" id="Sea...

'System.Web.HttpRequest' does not contain a definition for 'form'
Hello all. .NET 2.0 newbie here.... What I'm trying to do is learn how to use the LoadVars() in actionscript. Here is the .NET / C#/ html code  1 <form id="form1" runat="server"> 2 <div> 3 <% 4 if (Request.form("userName") == "Cameron") 5 { 6 Response.Write("&aspvar=it is You!"); 7 } 8 else 9 { 10 Response.Write("&aspvar=you are not Cameron&"); 11 } 12 13 %> ...

'System.Web.UI.Control' does not contain a definition for 'DataItem'
Hi, I am getting this error does anyone knows how to solve this :DHighOnCodingWanna get high! Show us the code that produces this error. Other than the exactness of the error, which explains what is exactly happening, we can't see why this is happening without seeing your code.David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(Please 'Mark as Answer' when i...

'System.Web.UI.Control' does not contain a definition for 'DataItem'
Hi, I am recieving this error: 'System.Web.UI.Control' does not contain a definition for 'DataItem' What iam trying to do is when a user clicks the hyperlink column in the datagrid then the ID of that user is send to another page and I need to run the Query or something and bind the Label on the page 2 with the name of the Person. So I am using the HTML view and writing something like this : '<%# DataBinder.Eval(Container.DataItem,"Name") %> ' here is my code behind file so how can i bind the Name of the person with the label: private void Page_Lo...

Cannot implicitly convert type 'System.Xml.XmlNode' to 'XmlNode' and 'XmlNode' does not contain a definition for 'AppendChild'
Hi,      XmlNode t = xmlDoc.SelectSingleNode("/NewDataSet/Table1/Template");//Cannot implicitly convert type 'System.Xml.XmlNode' to 'XmlNode'//        XmlText textNode1 = xmlDoc.CreateTextNode("hello");                       XmlElement ChildofTemplate = xmlDoc.CreateElement("ChildTemplate");//'XmlNode' does not contain a definition for 'AppendChild'// ...

'System.Web.UI.WebControls.Label' does not contain a definition for 'Invoke'
I am making an asyncronous call to a web service. When the callback happens and my delegate is called, I want to set a text value on a label on my page. In order to do this I need to use Label1.Invoke -- However, when I compile this I get an error'System.Web.UI.WebControls.Label' does not contain a definition for 'Invoke'I thought all controls should have an Invoke method on it.. I don't understand why I get this error? Any one experience the same thing or have any clue as to what is going on? // we must invoke to get back to the UI thread...this.Label1.Invoke(new La...

CS0117: 'System.Web.Security.MembershipUser' does not contain a definition for 'UserName'
Hi, I export my dataBase1 on others dataBase2. But , now, I have this errors.   Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0117: 'System.Web.Security.MembershipUser' does not contain a definition for 'UserName'Source Error: Line 77: { Line 78: MembershipUser memberUser = Membership.GetUser(); Line 79: if (memberUser.UserName != null && ...

'System.Web.UI.WebControls.Panel' does not contain a definition for 'drpData'
Hi i have the following problem: Compiler Error Message: CS0117: 'System.Web.UI.WebControls.Panel' does not contain a definition for 'drpData' Source Error: Line 59: strvBilled = filepath.ToString(); Line 60: strvPris = tbvPris.Text; Line 61: strvKategori = tbvKategori.drpData.SelectedItem.Value.ToString(); Line 62: strSQL = "INSERT INTO varelist (vNummer, vNavn, vBeskriv, vBilled, vPris, vKategori) Values ("; Line 63: strSQL += strvNummer + ", '"; It should come from this list: <asp:panel ID="tbvKategori" r...