The RadWindow is a client-side object – its UI is created
when it is first shown and this is the point when the CSS and scripts are
loaded as well. This means that it should be used on the client via JavaScript,
yet it turns out that it is a very common scenario that the developer wishes to
initiate the RadWindow’s showing from the code-behind.
The VisibleOnPageLoad property should not be used for this
purpose. It is a behavior property which will result in the RadWindow opening
every time the page is post back.
Quite often the VisibleOnPageLoad property gets set to true
while the intention is that the RadWindow should only show once. Doing so will
result in the RadWindow reopening if a postback is initiated from another
element from the page, which is rarely the desired behavior. Also, this
approach will not work in case this happens in an AJAX request and the
RadWindow is not included in the partial page update.
There are several ways to work around this:
1) Register a JavaScript function from the
server-side and do not use the VisibleOnPageLoad property, for example:
C#
VB:
2) Reset the
VisibleOnPageLoad property to
false
with code when suitable, depending on the particular scenario
3) Set
EnableViewState to
false for the
RadWindowManager that contains the desired RadWindows