Welcome to Dream.In.Code
Become an Expert!

Join 150,170 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,291 people online right now. Registration is fast and FREE... Join Now!




VisualWeb Developer 2008 Express

 
Reply to this topicStart new topic

VisualWeb Developer 2008 Express, Combo List Box

esmith236
27 Aug, 2008 - 08:03 AM
Post #1

New D.I.C Head
*

Joined: 27 Aug, 2008
Posts: 2

icon_up.gif

I have a 2 item combo list object in a data entry form. I am trying to get the selected value to bind to a field in a sql database table. I do this by selecting "edit data Bindings" in the Task list appended to the object.
In the right pain of the given window "selectedValue" is selected. In the Bind input bar I type "bind("field_name") and close the window. The following code is rendered but does not work.
CODE

   <asp:DropDownList ID="DropDownList2" runat="server"
                SelectedValue='<%# Bind("Medicare_A") %>'
                style="top: 223px; left: 262px; position: absolute; height: 22px; width: 77px; margin-bottom: 0px;"
                AutoPostBack="True" AppendDataBoundItems="True">
                <asp:ListItem>Yes</asp:ListItem>
                <asp:ListItem>No</asp:ListItem>
            </asp:DropDownList>


Any ideas on how to bind a selected value from a Combo box to database table field?

Thanks

esmith236@comcast.net
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 03:10AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month