Avatar of Ruffone
Ruffone
 asked on

Model Binding with Visual Studio 11 Beta

I have a WinForm application that is created in Visual Studio 11 Developer Preview. It used Model Binding to bind data to a GridView. I upgraded my environment to  Visual Studio 11 Beta and my application  no longer works. Does anyone know of any changes to the way this is done.

This is the error: "'Item' is not declared. It may be inaccessible due to its protection level." I could find "Items" but not "Item"

Thank you


    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        DataKeyNames="organizationId,organizationGuid"
        ModelType="Organization"  
        SelectMethod="BindGrid" MultipleActiveResultSets="True"
        EmptyDataText="There are no data records to display.">
        <Columns>
            <asp:TemplateField HeaderText="organizationGuid" SortExpression="organizationGuid" Visible="False">
                <ItemTemplate>
                    <asp:Label ID="organizationGuidLabel1" runat="server" Text='<%# Item.organizationGuid%>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
ASP.NETVisual Basic.NET

Avatar of undefined
Last Comment
Ruffone

8/22/2022 - Mon
Nasir Razzaq

>I have a WinForm application that is created in Visual Studio 11 Developer Preview.
>It used Model Binding to bind data to a GridView.

You have winforms app and you are using GridView? An ASP.NET GridView? I have not checked VS11 yet but have Winforms changed so much?
Ruffone

ASKER
Well, they tried it out at least in Visual Studio 11 Developer Preview as you can see in the 2 links below. I am trying to figure out if they kept it in for Visual Studio 11 Beta because my implementation broke when I installed VS11Beta
http://www.sitepoint.com/asp-net-4-5-strongly-typed-data-controls-model-binding/
http://webformsmodelbinder.codeplex.com/
ASKER CERTIFIED SOLUTION
Ruffone

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ruffone

ASKER
No appropriate responses from a user on this site. My question even taught CodeCruiser a thing or two.
Your help has saved me hundreds of hours of internet surfing.
fblack61