Why doesn't the UserAdmin Form work within a Master Page?

If you put the UserAdmin form inside a master page, you get an exception when you select a user from the list.

This is due to an issue with ASP.NET that is easily resolved by adding the following line of code to the UserAdmin.aspx code-behind file's lstUsers_SelectedIndexChanged() method:

this.lstUsers.SelectedValue = Request.Form[lstUsers.UniqueID];
UserPk = this.lstUsers.SelectedValue;

The first line of code calles Request.Form[] to retrieve the currently selected value of the ListBox and store it in the ListBox.SelectedValue property.


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 04/01/10
Comment or report problem with topic