该项目是.Net framework3.5和MVC框架1.0
在我看来,我有一个下拉列表
@Html.DropDownList("prodlist",@Model.products)
Run Code Online (Sandbox Code Playgroud)
"添加产品"按钮
<td> <input type ="button" name ="Add Product" value ="Add Product" id="Button1" /> </td>
Run Code Online (Sandbox Code Playgroud)
和一个文本框 @Html.TextBox ("prodselected")
当我点击"添加产品"按钮时,我应该能够在文本框"prodselected"中显示在Dropdownlist上选择的项目的值
请有人让我知道怎么做.如果现有代码中需要更改,请建议.
该观点是:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MockBDPWorkflowTestApp.ViewModels.WorkFlowTestViewModel>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Submission</title>
</head>
<body>
<div>
<% using (Html.BeginForm())
{
%>
<div>
<table>
<tr>
<td>
<div id="SID">
<table id="tblID" cellpadding ="0" cellspacing ="0" border="1">
<tr>
<td width ="50%"> <label for="Process Inastance Id"> Process Inastance Id: </label> <%=@Html.TextBox("pInstance",@Model.processInstance) %></td> …Run Code Online (Sandbox Code Playgroud)