Catch exception thrown by DropDownList set Declaratively

D

drop

Hi,

I have some DropDownLists that are contained in a DetailsView. Here's
a sample of my code for the DropDownLists :

<InsertItemTemplate>
<asp:DropDownList ID="ddl_TourOp" runat="server"
DataSourceID="ods_TourOp"
DataTextField="Text" DataValueField="Value"
SelectedValue='<%# Bind("Provider") %>'></
asp:DropDownList>
</InsertItemTemplate>

Since I set the SelectedValue declaratively using the Bind, is there
anyway I can intercept an exception thrown if the SelectedValue is not
valid?

I found that this is possible for some Controls ( example :
DetailsView OnItemInserted ) by using the EventArgs, but I haven't
found any way to do it this way with the DropDownList.

Anyone has any idea on how I can do this?

Thank you
Simon Picard
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top