This is a migrated thread and some comments may be shown as answers.

Gettng Compiler Error Message: CS0433

1 Answer 118 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mk
Top achievements
Rank 1
Mk asked on 16 Apr 2012, 01:45 PM
Please Help me .. when i use Check Boxes Serverside
then i get error ..
--------------------Error--------------
Compiler Error Message: CS0433: The type 'System.Web.WebPages.HelperResult' exists in both 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll'


-----------------------view --------------------------
@{ Html.BeginForm(); }
@{
    Guid[] checkedRecords = (Guid[])ViewData["Customers"];   
    Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Template(
                @<text>
                    <input name="checkedRecords" type="checkbox" value="@item.UserId " title="checkedRecords"
                    @if (checkedRecords.Contains(item.UserId))
                        {
                            <text>checked="checked"</text>
                        }
                                           />
                </text>)
                .Title("").Width(36).HtmlAttributes(new { style = "text-align:center" });
            columns.Bound(o => o.UserId).Width(100);
            columns.Bound(o => o.UserName ).Width(200);
          
                    })
        .Pageable()
        .Render();               
}
<p>
    <button type="submit" class="t-button t-state-default">Display checked orders</button>
</p>
@{ Html.EndForm(); }



-----------------Controller----------------

public ActionResult UsersDetails(Guid[] checkedRecords)
        {
            checkedRecords = checkedRecords ?? new Guid[] { };
            ViewData["Customers"] = checkedRecords;

            ViewData["Customers"] = Membership
            .GetAllUsers()
            .Cast<MembershipUser>()
            .Select(x => new UserDetails
            {
                UserId = UserDetails.Getguid(x.UserName),
                UserName = x.UserName,
                            });
          
            return View();
        }



1 Answer, 1 is accepted

Sort by
0
Sergei
Top achievements
Rank 1
answered on 06 Sep 2012, 08:02 PM
I have ugraded from mvc2.0 to 3.0 and I had the same issue. To resolve it, i've just removed reference to WebPages from project.
Tags
Grid
Asked by
Mk
Top achievements
Rank 1
Answers by
Sergei
Top achievements
Rank 1
Share this question
or