1

I get an exception saying "The 'model' keyword must be followed by a type name on the same line" when i try to load my page.

QuickTimingSpeakerInfo.Controllers.BracketWidgetModel is a class.

in the cshtml file i have the following:

@model QuickTimingSpeakerInfo.Controllers.BracketWidgetModel

<script type="text/javascript">
    $(document).ready(function () {
        $("#SettingsMenuButton-" + '@model.Guid').button({
            icons: {
                primary: "ui-icon-circle-arrow-w"
            },
            text: false
        })
        .click(function () {
            ChooseWidgetInitialize(@Model.TabId, @Model.WidgetId, @Model.EventUID);
        });
    });
</script>...

It was working only a short moment ago. Rebuilding does not solve it. How do i resolve this?

4

1 回答 1

2

问题是我使用了@model.field 而不是@Model.field。错误消息指向第一行,而不是错误所在的实际行。

于 2012-09-20T13:18:29.467 回答