Last post Aug 08, 2014 10:28 AM by markweaton
Aug 08, 2014 07:32 AM|markweaton|LINK
I have successfully implemented Cascading Dropdownlists in Webmatrix (Web Pages & Razor) using
THIS article from mikesdotnetting.
What I am now trying to do is extend this to my edit page, whereby the data is already populated in the DB and should be displayed as the default value for each dropdown list.
What is happening is the dropdown list is defaulting to the first alphabetical option in the list as opposed to the value already contained in the DB.
Has anybody had any luck implementing this with existing data as opposed to a new entry into the DB?
I will post code for working and non-working if required.
Aug 08, 2014 07:53 AM|markweaton|LINK
I don't think I have explained this very well.
As opposed to the article above, I am not trying to only have dropdowns become enabled when the previous one is populated.
All dropdowns will be enabled on the edit page but will only be populated with related entries based on their value at the time the page loads.
Aug 08, 2014 10:28 AM|markweaton|LINK
Solved the issue by using Request.Querystring from the parent page to pre-populate the next dropdown based on the value passed.
Working like a charm.