I_Am_Not_user3185054
I_Am_Not_user3185054

Reputation: 153

occasional reload of page in ASP.NET

I'm making a webpage in ASP.net, combined with VB.net. The current page I'm working on, is some sort of 'Quiz' webpage. The user has to fill in 40+ radiobuttons, depending on his personality and such.

Though throughout testing I've realized the webpage will occasionally reload, forcing every checked radiobutton to go back to unchecked. This will happen at seemingly random moments, sometimes not at all, sometimes 2 times in a row. This is especially annoying since there are so many radiobuttons to be checked, forcing the user to start over.

Does anybody have any idea why this could happen? Any help would be much appreciated.

Upvotes: 0

Views: 53

Answers (1)

Matteo Gottard
Matteo Gottard

Reputation: 21

if(!Page.IsPostback)
{
  //.. your code goes here
}

Upvotes: 1

Related Questions