How to built UserControl in VB.NET

Last post 11-07-2006, 4:54 AM by quartz. 1 replies.
Sort Posts: Previous Next
  •  09-10-2006, 4:15 AM Post number 2016

    How to built UserControl in VB.NET

    Dear all,
    I have a problem with UserControl in .NET. I have a table Product. It has 2 columns: Product Name and Price .Ex

    ProductName      Price
    Coca Cola           1$
    Pepsi                   2$
    Tiger Beer           5$

    Now I want to build a UserControl : a combox use load ProductName and a textbox load Price. And they depent on total records in table Product. Mean, when i add usercontrol on WinForm, we will see 3 rows.(If we have 5 records in table Product we have 5 rows).

    Then, I have a table Order. I want to insert these value in this table. Please help me how to load data to control and use those values insert to Order table on database.

    Thanks a lot,

    DoiKhongDoiThu

     

     

  •  11-07-2006, 4:54 AM Post number 4717 in reply to post number 2016

    • quartz is not online. Last active: 11-09-2006, 5:33 PM quartz
    • Top 50 Contributor
    • Joined on 09-25-2006
    • San Diego, California
    • Level 2: Deep Blue

    Re: How to built UserControl in VB.NET

    a databound user control

    drpUsers.Items.Clear()

    drpUsers.DataSource = _DataSource

    drpUsers.DataTextField = "ProductName"

    drpUsers.DataValueField = "Price"

    drpUsers.DataBind()

    if you want a step by step user guide check the link http://www.15seconds.com/issue/020319.htm 


    Omit Needless Words - Strunk, William, Jr.

    Web-based Project Management
View as RSS news feed in XML