Swati Sharma

Swati Sharma

  • NA
  • 17
  • 9.2k

Error : Only one 'model' statement is allowed in a file.

Jul 28 2015 6:26 AM

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Only one 'model' statement is allowed in a file.


Source Error:

Line 4:      ViewBag.Title = "Create"; Line 5:  } Line 6:  @model int Line 7:   Line 8:  @{

Source File: /Views/tblhotelmasters/Create.cshtml Line: 6
 
 
 
@model WebPortal_Planmiles.Models.Data.tblhotelmaster
@{
ViewBag.Title = "Create";
}
@model int
@{
var chk = "checked";
var checked1 = Model == 1 ? chk : null;
var checked2 = Model == 2 ? chk : null;
var checked3 = Model == 3 ? chk : null;
var checked4 = Model == 4 ? chk : null;
var checked5 = Model == 5 ? chk : null;
var htmlField = ViewData.TemplateInfo.HtmlFieldPrefix;
}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Answers (7)