Monday, June 18, 2007

2-way databinding cascading drop down lists within a FormView*

Monday, June 18, 2007 1:33:51 AM (GMT Standard Time, UTC+00:00)

Recently while trying to get (databound) cascading drop down lists (a dropdownlist that is dependent on another) within a FormView to work, I came across the error "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."

Anyone who comes across this error whilst trying to get dependent drop down lists working, I advice you to check Demo for 2-way databinding cascading lists within a FormView. It's a great resource as the author first explains the error (and even directs you to MS's comments on it), and also gives a sweet approach (with code in VB and C#) to handling cascading drop down list.

Kudos to him/her! They saved me a good amount work!

Related posts:
Select a random row in MS SQL...
Regular expressions
VS2005, ASP.NET 2 & DLLs, DLLs..
MS's ASP.NET and.. PHP
ApplicationName Property when customising providers
Formatting strings/numbers in .NET

Comments are closed.