When a RadButton with a PostBackUrl property set is located inside an UpdatePanel, it does not redirect to the PostBackUrl on click and a JavaScript error message is thrown.
The workaround is to use:
- Either a RadButton (ButtonType="LinkButton") and set its NavigateUrl to the desired page that is to be redirected
-OR a RadButton (ButtonType="StandardButton") and use its OnClientClicking event handler to cancel the postback and redirect to the desired page through window.location.href. For example:
<script type="text/javascript">
function OnClientClicking(sender, args) {
window.location.href = "http://www.bing.com";
args.set_cancel(true);
}
</script>