If an asp.net DropDownList's is set to EnableViewState=false, DropDownList.SelectedItem returns null.
Then what technique can I use to get the SelectedItem of that DropDownList while keeping that EnableViewState=false?
Request.Form[yourDropDownList.UniqueID]
UniqueID returns "ctl00$ContentMain$ddlCountry" where as ClientID returns "ctl00_ContentMain_ddlCountry"
The UniqueID is inserted to the name of the HTML form which is used in the postback form name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With