This is a migrated thread and some comments may be shown as answers.

Navigate url not working

1 Answer 172 Views
Button
This is a migrated thread and some comments may be shown as answers.
beeta one
Top achievements
Rank 1
beeta one asked on 28 Sep 2012, 03:31 AM
HII,
  I have a RadButton which is a StandardButton. I also attached the NavigateUrl property of RadButton. But on clicking on the RadButton it is not navigating to the url specified. Why the NavigateUrl is not working?

thankss

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Sep 2012, 03:45 AM
Hi Hash,

Try the following code snippet to achieve the NavigateUrl property with a RadButton configured as StandardButton.

ASPX:
<telerik:RadButton ID="RadButton" runat="server" Text="RadButton" NavigateUrl="http://www.telerik.com/" OnClientClicking="OnClientClicking">
</telerik:RadButton>

JS:
<script type="text/javascript">
    function OnClientClicking(button, args) {
        window.location = button.get_navigateUrl();
        args.set_cancel(true);
    }
</script>

Please take a look into this documentation for more information.

Hope this helps.

Regards,
Princy.
Tags
Button
Asked by
beeta one
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or