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

How to create new .aspx page with Telerik 'boilerplate' code?

3 Answers 188 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 07 Jul 2011, 11:40 PM
Hi there!
I've spent some time looking through forums, watching videos and going through the tutorials, but I can't seem to find an easy way to create new aspx pages in my web application, that include all the 'boilerplate' code as supplied by Telerik's new project wizard.

When I create a new project with Telerik's VSE, I get a project that looks like this:

    Refer to attched file: "default_aspx_in_solution.png"


If one opens the markup for default.aspx, the 'boilerplate' code for all the Telerik AJAX 'stuff' is apparent:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
 
    </div>
    </form>
</body>
</html>


However if I now create a new webforms page I get the standard template as defined by MSFT:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyNewForm.aspx.cs" Inherits="MyRadControlsWebApp.MyNewForm" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
    </div>
    </form>
</body>
</html>


On large websites it will be a real pain to continuously copy and paste the Telerik 'template' into every new page that is created.

Surely there is an easy way to create a new aspx page that automatically includes all of Telerik's boilerplate code.

Can anyone help?

Thanks,

Paul.

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 08 Jul 2011, 08:13 AM
Hi Paul,

To create more Telerik-ready pages, you should use the Telerik menu in Visual Studio's toolbar. Choose either RadControls or Other scenario, to get access to the different scenarios available.


All the best,
Georgi Tunev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Paul
Top achievements
Rank 1
answered on 08 Jul 2011, 08:54 AM
Hi Georgi

Yes, of course... That makes sense and is intuitive (which is what I would have expected from Telerik), why is why I tried it many times and gave up!

I tried the VSE scenario menu many times, and no matter what I choose (i.e. which scenario) the wizard exits and nothing at all happens.

I am presuming therefore that something happened with the install and I will uninstall and re-install.

Is there anyting else I should know at this point? Is re-installing the correct course of action? Is there anything I can do at my end in order to troubleshoot the issue and give you some feedback as to what caused the problem?

Thanks,

Paul.
0
Erjan Gavalji
Telerik team
answered on 08 Jul 2011, 04:36 PM
Hi Paul,

I'm sorry for the bad experience.
We haven't come across the Add New Scenario wizard to just close without an action (or at least an error message). Can you help us with a video or a screenshot?

Your replies to the following questions might also help me understand the problem better:

Can you check the Tools -> Extension Manager (if you use Visual Studio 2010) for the version of the Telerik WebUI VSPackage package?

Did you have previous versions of RadControls installed? Did you perform an upgrade when installing the latest one, or did you make a complete uninstall first?

Looking forward to your reply,
Erjan Gavalji
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Paul
Top achievements
Rank 1
Erjan Gavalji
Telerik team
Share this question
or