<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
<% Html.Telerik().TabStrip()
                  .Name("TabStrip")
                  .Items(builder =>
                  {
                      builder.Add()
                             .Text("Tab1")
                             .Content(() =>
                             {
                                 %> Test content <% });
                      builder.Add()
                             .Text("Tab2")
                             .LoadContentFrom("Tab1", "Tab123");
                      builder.Add()
                             .Text("Tab3")
                             .Content(() =>
                             { %> Test content <% });
                  }).Render();
%>

<button onclick="getValidators()">click</button>

<script type="text/javascript">

    function getValidators() {
        Sys.Mvc.FormContext._Application_Load();
    }

    Sys.Mvc.FormContext.prototype._form_OnClick = function Sys_Mvc_FormContext$_form_OnClick(e) {
        var errorMessages = this.validate('submit');
        if (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(errorMessages)) {
                    e.preventDefault();
        }
    }    
</script>
</asp:Content>
