PC Review


Reply
Thread Tools Rate Thread

Catch exception thrown by DropDownList set Declaratively

 
 
drop
Guest
Posts: n/a
 
      7th Feb 2007
Hi,

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

<InsertItemTemplate>
<aspropDownList ID="ddl_TourOp" runat="server"
DataSourceID="ods_TourOp"
DataTextField="Text" DataValueField="Value"
SelectedValue='<%# Bind("Provider") %>'></
aspropDownList>
</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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to inline/declaratively data bind a dropdownlist in a wizard step? Bogdan Microsoft ASP .NET 0 20th May 2008 06:08 PM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs Microsoft ASP .NET 1 16th Nov 2007 05:57 PM
set selected value declaratively to dropdownlist podi Microsoft ASP .NET 3 3rd Oct 2006 04:57 PM
Catch Exception thrown by spawned Thread.Start in Parent Thread =?Utf-8?B?RGF2ZSBCb29rZXI=?= Microsoft Dot NET Framework 6 22nd Nov 2005 01:33 AM
Why is "Unhandled Exception" thrown within a Try-Catch block? Jerad Rose Microsoft VB .NET 3 7th Oct 2003 08:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:01 PM.