CodeSmith Community
Your Code. Your Way. Faster!

objectdatasource

Latest post 03-02-2007 2:45 AM by swin. 1 replies.
  • 03-01-2007 4:38 PM

    • roglan
    • Top 500 Contributor
    • Joined on 01-14-2006
    • Posts 18
    • Points 440

    objectdatasource

    could anyone please give me some pointers on how to use the objectdatasource with nettiers an vs2005. I've created an asp.net project, generated nettiers code, and when I drop a combobox on the page an use the gui tools to connect to objsource I select to use tablename.sqlclient.getall and everything looks fine. But when I run it - it says "no parameterless constructor" etc... any ideas on how this is supposed to be setup?

    roger

     

     

    • Post Points: 45
  • 03-02-2007 2:45 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 924
    • Points 34,750

    Re: objectdatasource

    see here http://community.codesmithtools.com/forums/thread/18699.aspx

    if you want to wire up a dropdownlist though you should try using the new EntityDropDownList with a strongly typed data source as these are a piece of cake to wire up...

    <data:EntityDropDownList runat="server" ID="dataProductID" DataSourceID="ProductIDProductsDataSource" DataTextField="ProductName" DataValueField="ProductID" SelectedValue='<%# Bind("ProductID") %>' AppendNullItem="true" Required="true" NullItemText="< Please Choose ...>" ErrorText="Required" />

    <data:ProductsDataSource ID="ProductIDProductsDataSource" runat="server" SelectMethod="GetAll"  />

    You can find them both in the WebLibrary.

    hth

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems