DropDownList in listview insert Template binding problem

W

WebBuilder451

i have this in an Insert Template
Relationship: <asp:DropDownList ID="ddlContactType" runat="server"
SelectedValue='<%# Bind("IContactType") %>'
DataSourceID="odsContactType"
DataTextField="SzDesc" DataValueField="IID">
</asp:DropDownList>
The same is in the edit template and it works fine. but if i include it in
the insert template i get this error: Databinding methods such as Eval(),
XPath(), and Bind() can only be used in the context of a databound control.

am i doing something wrong? the textboxes bind without error?

--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)

kes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top