Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Am getting this error in my code

CSS
Server Error in '/' Application.

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: CS1501: No overload for method 'Label' takes 2 arguments

Source Error:


XML
Line 55:    <%Html.ValidationSummary(); %>
Line 56:     <div class="form-group">
Line 57:         <%Html.Label("Select Chart:", new { @class = "col-md-2  control-label"}); %>
Line 58:         <div class="col-md-10">
Line 59:             <%Html.DropDownList("Chart", ViewData["Chart"] as SelectList, new { @class = "form-control" }); %>


hOW to resolve this error?
Posted

Hello ,
Check this solution : Link

thanks
 
Share this answer
 
Html.Label is an extention method. The first parameter is implied. Check here:
http://msdn.microsoft.com/en-us/library/ee310185%28v=vs.118%29.aspx[^]

Good luck!
 
Share this answer
 
<![CDATA[<%Html.Label("Select Chart", new { @class = "col-md-2  control-label"}); %>]]>

try the above line.

you can refer this link
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900