1

i want to use Ext.net control in aspnet mvc 3 but i can not do that. Can you help me?


<h2>List</h2>
<div>
        <% Ext.Net.TabPanel tb = new TabPanel() { ID="tb1", Height = 300 };
           tb.Items.Add(new Ext.Net.Panel() { ID = "1", Title = "Test" });


        %>
    </div>

But no result return to me if i look page source result:



<!DOCTYPE html>

<html>
<head>
    <link rel="stylesheet" type="text/css" href="/WebResource.axd?d=yZr1qXAiAzbIyuMwWFg4QLahCw7ja-r5MvwrWaYGNYBiSLompC1t3Dre6yVT_nX3dE_5QRW8Pq_M_mf3ckpaRofaHZG9JTWR4XNA3Qlk1l0lrRtAk7_XdSqezLOHVVzNAnFsM_Xvd-_Jkz3oAxnZR52Pj2Gx6OQ6XgRMpjV7wg41&t=634661604900000000" />
<title>

    List

</title>
     <style type="text/css">
      html
      {
         background-color:Gray;
      }

      .column
      {
         float:left;
         width:75%;
         border:solid 1px black;
         margin-right:10px;
         padding:5px;
         background-color:white;
         min-height:750px;
      }

   </style>

    <script type="text/javascript" src="/WebResource.axd?d=EEB3ci-aaYX0YFB1eKO9bNJxz21l7U6Xgp6gafhX-ELA3dqrXi0vJChPyMcsY02FqNHlDFzFUXhC1Wr20e23KQDHybExiJcMtk25sY6H14MJWhlFGE-pP5O0yfnfTY5rqctCxUyaF0PEA-FTaqBmsMnVHTwakoGf9vavE-17ugQ1&t=634661604900000000"></script>
    <script type="text/javascript" src="/WebResource.axd?d=MC7em5dhNLnBAdrW93hZYkG4dXWQcASL6iXw2IQb1NzxHMGA11tPZfow93hy4T_4dZqotlxW-YF95RJptzY352oINWGWb6cJr4JvBvRDC0amtlBU65lPTxvQeag4qmgoBXQ3Y-KW6mtrxsiGMKkIRQ2&t=634661604900000000"></script>
    <script type="text/javascript" src="/WebResource.axd?d=hG2uE2_g7tabtfNStz4lSLSwuXYXbXisubF7Fk7ezPJp9TZl2fyBJu3H-wYG-DS9JithBK3TA4ThRCkhX53y2HlV02jYOaX-dL8EVSpL2hvpa6PYag6EVudAnf_JzCoPcMqKXc2dJ0PFK5qP7XXZeQ2&t=634661604900000000"></script>
    <script type="text/javascript">
    //<![CDATA[
        Ext.net.ResourceMgr.init({id:"ctl00$ResourceManager1",BLANK_IMAGE_URL:"/WebResource.axd?d=SanxrxztuPyOAwG7dcFi5HvB6yOoIwnKJN3sevUiXssgue_dNhgx0KWC2p7tE4ygV4N6_n3aqstZCgfhUs4nL5nCZggPLeFdFhYYgXln5EK0OaMOfRO77y22sclo4saMp9irYOG5hNb8NvsMMkgeqm9TCwonBfPgYchN-BVRq4c1&t=634661604900000000",theme:"blue"});Ext.onReady(function(){Ext.QuickTips.init();});
    //]]>
    </script>
</head>

<body>

    <div class="column">
       <h1>Job Schedule </h1>


<h2>List</h2>
<div>

    </div>



    </div>
</body>
</html>

2 Answers 2

4

The code you have posted is WebForm syntax.

If you are using ASP.NET MVC Razor and the latest Ext.NET v2.x release, you can render all/any of the Ext.NET Components using Razor syntax.

The following sample demonstrates rendering a very simple TabPanel.

Example

@{
    Layout = "";    
}

<!DOCTYPE html>

<html>
<head>
    <title>Ext.NET Examples</title>
</head>
<body>    
    @Html.X().ResourceManager()

    @(Html.X().TabPanel()
        .Height(300)
        .Items(items => {
            items.Add(Html.X().Panel().Title("Test"));
        }));
</body>
</html>

Hope this helps.

2
  • 1
    can you give me some samples Ext.Net in mvc 3 how to do that?
    – loki
    Mar 29, 2012 at 7:51
  • Hey @programmerist, did you find any samples??? I also wanna use ext.net controls with asp.net mvc razor engine. But I am stuck due to lack of samples. It would be great if you provide me with samples if you have any. Aug 27, 2012 at 10:16
1

Page.Controls is present only in web forms. I suspect that your control is for web forms, therefore it won't work with MVC.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.