Country selector fires postback if inside updatepanel

Dmitriy Nenazhenko asked on June 27, 2016 08:42

Hi all, I am trying to add form into updatepanel. In my form there is country selector exists.
When I select country postback happens. How to avoid this? Because I have if(isPostBack && Page.IsValid) condition on my forms OnLoad, so if it passes then I show different layout.
But country selector every time does postback and every time page is valid.

Recent Answers


Jan Hermann answered on June 27, 2016 08:56 (last edited on June 27, 2016 11:11)

That's how the country selector is designed. It has to check if there is no state to list (some of the countries have states assigned -> like USA) and you can specify your own ones. That's why it fires a postback.

You can workaround it easily by using simple dropdown list form control that selects only countries (db -> CMS_Country) or using the Uni selector (cms.country).

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.