Control HTML Output From Custom Databound Conrtol RRS feed

  • Question

  • User-1222988403 posted

    I am trying to make some reusable controls. I do not want to rely on .ascx files. I need to bind "objects", "generic lists", and "data sets" to them.

    Idealy I would like to do this.

    1. Add an ObjectDataSource to the page like this.

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllPersons"


    2. Then add my control to the page like this.

    <asp:MyCustomControl ID="GridViewAllNews" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"

    AllowPaging="True" PageSize="5" OnRowCreated="GridViewAllNews_RowCreated" BorderWidth="0"


    I do not want to do this stuff.




                           [INSERT HTML FORMAT HERE]

    I would like have control over the rendering without using a <asp:TemplateField> then a <ItemTemplate>

    I want to rendor data like a gridview with using Item template stuff. I also need paging. These controls would be handed over to devs to complete site

    I want the same layout across customers websites. I am trying to standardize how data is displayed in certain content areas of the sites.

    using ascx files ties them to one website. 

    I need to be pointed in the right direction. 

    Thanks in advance.



    Thursday, September 4, 2008 10:10 PM