Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 凭身份证拿到房间_Asp.net Mvc_Asp.net Mvc 3 - Fatal编程技术网

Asp.net mvc 凭身份证拿到房间

Asp.net mvc 凭身份证拿到房间,asp.net-mvc,asp.net-mvc-3,Asp.net Mvc,Asp.net Mvc 3,我正在MVC3中从事一个酒店预订项目 我在这里展示了这些房间: 当我点击预订romm时,我会看到: 但我想做的是直接在预订表房间框中获取我选择的房间号码 以下是我的预订创建视图: @using (Html.BeginForm()) { @Html.ValidationSummary(true) <fieldset> <legend>Reservation</legend> <div class="editor-label">

我正在MVC3中从事一个酒店预订项目 我在这里展示了这些房间:

当我点击预订romm时,我会看到:

但我想做的是直接在预订表房间框中获取我选择的房间号码

以下是我的预订创建视图:

@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
    <legend>Reservation</legend>

    <div class="editor-label">
        @Html.LabelFor(model => model.Room_ID, "Room")
    </div>
    <div class="editor-field">
        @Html.DropDownList("Room_ID", String.Empty)
        @Html.ValidationMessageFor(model => model.Room_ID)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Guest_ID, "Client")
    </div>
    <div class="editor-field">
        @Html.DropDownList("Guest_ID", String.Empty)
        @Html.ValidationMessageFor(model => model.Guest_ID)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Data_Check_in)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Data_Check_in)
        @Html.ValidationMessageFor(model => model.Data_Check_in)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Data_Check_out)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Data_Check_out)
        @Html.ValidationMessageFor(model => model.Data_Check_out)
    </div>



    <div class="editor-label">
        @Html.LabelFor(model => model.Preference_ID, "Preferinte")
    </div>
    <div class="editor-field">
        @Html.DropDownList("Preference_ID", String.Empty)
        @Html.ValidationMessageFor(model => model.Preference_ID)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Price)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Price)
        @Html.ValidationMessageFor(model => model.Price)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Card_ID, "Card_de_credit")
    </div>
    <div class="editor-field">
        @Html.DropDownList("Card_ID", String.Empty)
        @Html.ValidationMessageFor(model => model.Card_ID)
    </div>

    <p>
        <input type="submit" value="Create" />
    </p>
</fieldset>
@使用(Html.BeginForm()){
@Html.ValidationSummary(true)
预订
@Html.LabelFor(model=>model.Room_ID,“Room”)
@Html.DropDownList(“Room_ID”,String.Empty)
@Html.ValidationMessageFor(model=>model.Room\u ID)
@Html.LabelFor(model=>model.Guest_ID,“客户端”)
@Html.DropDownList(“Guest_ID”,String.Empty)
@Html.ValidationMessageFor(model=>model.Guest\u ID)
@LabelFor(model=>model.Data\u签入)
@EditorFor(model=>model.Data\u签入)
@Html.ValidationMessageFor(model=>model.Data\u签入)
@LabelFor(model=>model.Data\u签出)
@EditorFor(model=>model.Data\u签出)
@Html.ValidationMessageFor(model=>model.Data\u签出)
@LabelFor(model=>model.Preference\u ID,“Preferinte”)
@DropDownList(“Preference_ID”,String.Empty)
@Html.ValidationMessageFor(model=>model.Preference\u ID)
@LabelFor(model=>model.Price)
@EditorFor(model=>model.Price)
@Html.ValidationMessageFor(model=>model.Price)
@Html.LabelFor(model=>model.Card\u ID,“信用卡”)
@Html.DropDownList(“Card_ID”,String.Empty)
@Html.ValidationMessageFor(model=>model.Card\u ID)


}

能否使用视图模型将房间id从第一页传递到表单页