I have created a detailsView control to add/edit/delete profiles on the application which has a field "Country Name". What I would like to do is that, when "insert Template" is selected there is a Dropdown list with list of countries. But when edit template is selected, there can be two possibilities. If the "type" field from my query string says "a" then I should be able to select any country from the dropdownlist. But if the "type" field says "b" then the dropdownfiled should be disables and should show the original country of the person.
I tried adding a dropdowm list in details view "ItemTemplate", ddCountryList. But now when I try to access it in the code file, it says "ddCountryList" does not exists in current context.
What can be the reason and how can disable and enable a control based on querystring value?
View Complete Post