Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Basically i wanted to have a textbox display the selected value from a asp drop down list.Code is as follows:

XML
<script type="text/javascript">
       var viewModel = {
           value : ko.observable()
       };
       ko.applyBindings(viewModel);

   </script>


XML
<asp:TextBox ID="txtSalesOrd" runat="server" Width="192px"  data-bind="text:value"></asp:TextBox>
                    <asp:DropDownList runat="server" ID="ddlSalesOrd" AutoPostBack="true" data-bind="value:value"
                         SelectMethod="SalesOrders" DataTextField="SALES_ORDER_NUMBER" DataValueField="ORDER_HEADER_ID" OnSelectedIndexChanged="ddlSalesOrd_SelectedIndexChanged" >
                         <%--<asp:ListItem Value="0">Select One:</asp:ListItem>--%>
                     </asp:DropDownList>


I have never used knockout and just wanted to give it a try. Am I even close?
Thnak you,
Ryan
Posted

1 solution

 
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