Dynamic URL for Tab Strip Client Side

3 posts, 0 answers
  1. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 22 Mar Link to this post

    Hi I have following structure of code

     

     
     Global.asax - conytains URL Routing as it is
     -------------------------------------------------------------------
     routes.MapPageRoute("Company",
                    "/Health/Company/{ID}/{Name}",
                    "~/Health/company/CompanyPro.aspx"
                    );


    Company.master contains tabstrip and iam creating the Dynamic url url1 url2 etc. Hoe can i assign this url to  tab strip url through javascript ?

    -----------------------------------------------------
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
    ...........
    var url1 = String.format('/Health/Company/{0}/{1}/{2}', clientid, name);
    var url2 =  --- Some URL ---

    </script>

    please help
               
    </telerik:RadScriptBlock>

     <telerik:RadTabStrip ID="radTabMain" runat="server" Width="100%" OnTabClick="radTabMain_TabClick">
                <Tabs>
                    <telerik:RadTab Text="Home" runat="server" Url="">
                    </telerik:RadTab>
                    <telerik:RadTab Text="AboutUs" runat="server" Url="">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Contact Us" runat="server" Url="">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Feedback" runat="server" Url="">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>

  2. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 24 Mar Link to this post

    anybody can give a suggestion please ?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 25 Mar Link to this post

    Hello Divya,

    You can get a reference to the RadTabStrip and find the particular PageView, which should be associated with a specific RadTab. Once having a reference to the PageView, you can use the set_contentUrl(), in order to change is and achieve the desired functionality.

    In the documentation article below you can find the ClientAPI for the PageView, and the aforementioned set_contentUrl listed in the table of methods:

    http://docs.telerik.com/devtools/aspnet-ajax/controls/tabstrip/client-side-programming/radpageview-object


    Regards,
    Nencho
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top