Server control won't bind to database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roblasch
    New Member
    • Mar 2010
    • 2

    Server control won't bind to database

    I have a server control that inherits a dropdownlist. I can't for the life of me get it to bind in a formview insert template.

    <TeamDD:TeamDro pDownList ID="TeamID" runat="server" DataTable="tblT eams" DataTextField=" TeamName" ConnectString=" <%$ ConnectionStrin gs:MallersConne ctionString %>">
    </TeamDD:TeamDrop DownList>

    a regular dropdownlist resides nearby and works fine for the insert.

    <asp:DropDownLi st ID="VenueID" runat="server" DataSourceID="S qlDataSource5"
    Text='<%# Bind("VenueID") %>' CssClass="stand ardInput" DataTextField=" Venue" DataValueField= "VenueID">
    </asp:DropDownLis t>

    If I run the insert like this it works. If I add the bind statement to the server control I get the following error:
    The type name 'TeamDropDownLi st' does not exist in the type 'TeamDropDownLi st.TeamDropDown List'

    The line number the error is pointing to is the formview tag.

    Any ideas?

    The custom contol doesn't do anything except filter the drop down based on the logged in user.
  • roblasch
    New Member
    • Mar 2010
    • 2

    #2
    I found this

    http://bursjootech.blogspot.com/2008...nce1-does.html This was the problem. the class was sharing the same name as the namespace.

    Comment

    Working...