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

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top