This post originated from an RSS feed registered with .NET Buzz
by Paschal.
Original Post: Few thoughts on debugging
Feed Title: help.net
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/pleloup/Rss.aspx
Feed Description: .Net for mankind !
Maybe this will help somebody now or in the future. I was working on some dynamic dropdown lists (3 exactly) interacting together and some databinding. You know you choose a menu and the other ones populate in function of the first one. Easy? Yes and no.
I had some bugs coming randomly about the fact my code was trying to select multiple elements in one of the dropdown.
My point here is that whatever I could do, Try..Catch was not able to trap the error.
Apparently the problem come because the dropdown is render by .Net only at the end (HTMLTextwriter). So of course you have no idea which line in your code create the wrong statement.
Annoying because I had no way to identify the issue.
So my modest advice if this happens to you, transform your dropdown as listboxes object.
You will be able to set the selectionmode as multiple and magically your code will work, exposing clearly then the faulty multi selection on one of your lists.