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.
Loading
Sachin SinghPosted Aug 26, 2022, 11:00 AM
Rajanikant HawaldarPosted Aug 26, 2022, 10:56 AM
Garima BansalPosted Aug 26, 2022, 10:54 AM
Rajanikant HawaldarPosted Aug 26, 2022, 10:45 AM
in OnLoad method of your userControl add this
if(!IsPostBack)
{
myTextBox.Text = string.Empty;
//here clear rest of your textboxes make your textboxes clear
}