How can usercontrol field values like textbox can be set to null on page refresh. However its possible to set null values once page is submitted that is on submit button click but on refreshing page it retains old values. So how those values can be set to null.
Set user control fields values to empty on page refresh
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 26, 2022, 6:45 AM EDT
in OnLoad method of your userControl add this
if(!IsPostBack)
{
myTextBox.Text = string.Empty;
//here clear rest of your textboxes make your textboxes clear
}
Garima BansalRank #1,555 · 1K reputationPosted Aug 26, 2022, 6:54 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 26, 2022, 6:56 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Aug 26, 2022, 7:00 AM EDT