today I was trying to populate a dropdownlist in the page's load function in the code behind page. I set the "selectedvalue" property to a field from the datasource of the formview that the dropdownlist was in.
but I kept getting a page error saying that the selected value did not exist in the list.
So I finally realised that the page was trying to set the selectedvalue before the items were inserted into the dropdownlist.
Can anyone explain the order of execution in asp for me? I just assumed the page load would be the first thing to execute.
but I kept getting a page error saying that the selected value did not exist in the list.
So I finally realised that the page was trying to set the selectedvalue before the items were inserted into the dropdownlist.
Can anyone explain the order of execution in asp for me? I just assumed the page load would be the first thing to execute.