Fix bug DNN-24984: save the ResourceKey value into viewstate.