Hi,

I am going to convert my application which is quite large to the razor engine. As there isn't much documentation, I would like to ask a
kind of silly question. My master page was originally written as shown below:

<%@ Master Language="C#" CodeBehind="Site.master.cs" Inherits="STSFinancials.Views.Shared.Site" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Register src="~/Views/Shared/WestMenu.ascx" tagname="WestMenu" tagprefix="uc1" %>
<%@ Register src="~/Views/Shared/HelpWindow.ascx" tagname="HelpWindow" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Financials</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="~/css/main.css" />
<ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" />
<script type="text/javascript">
var STSFinancialBrowser_hashCode = function (str) {
var hash = 1315423911;

for (var i = 0; i < str.length; i++) {
hash ^= ((hash << 5) + str.charCodeAt(i) + (hash >> 2));
}

return (hash & 0x7FFFFFFF);
}

var STSFinancialBrowser_addTab = function (config) {
var win, tab, hostName, financialViewName, node;
if (Ext.isEmpty(config.url, false)) {
return;
}

var tp = Ext.getCmp(config.tabView);
var id = STSFinancialBrowser_hashCode(config.url);
tab = tp.getComponent(id);
if (!tab) {

tab = tp.addTab({ id: id.toString(),
title: config.title,
iconCls: config.icon || 'icon-applicationdouble',
closable: true,
autoLoad: {
showMask: true,
url: config.url,
mode: 'iframe',
noCache: true,
maskMsg: "Loading " + config.title + "...",
scripts: true,
passParentSize: config.passParentSize
}
});

}
else {
tp.setActiveTab(tab);
Ext.get(tab.tabEl).frame();
}
}
</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server"/>

This works pretty good. The problem that I am having is 2-fold. First, I need to bring the ExtJS framework in before I declare the javascript function in the head section. By using the ext:ResourcePlaceHolder control before the script tag, I was able to define the ExtJS framework before it is used. Most ofl your razor examples usually start with the following @Html.X() to bring in Ext.Net. Can I use the code as defined below using the
@Html.X().ResourcePlaceHolder() before I define the javascript.


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Financials</title>
<link rel="stylesheet" type="text/css" href="~/css/main.css" />
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
@Html.X().ResourcePlaceHolder()
<script type="text/javascript">
var STSFinancialBrowser_hashCode = function (str) {
var hash = 1315423911;

for (var i = 0; i < str.length; i++) {
hash ^= ((hash << 5) + str.charCodeAt(i) + (hash >> 2));
}

return (hash & 0x7FFFFFFF);
}

var STSFinancialBrowser_addTab = function (config) {
var win, tab, hostName, financialViewName, node;
if (Ext.isEmpty(config.url, false)) {
return;
}

var tp = Ext.getCmp(config.tabView);
var id = STSFinancialBrowser_hashCode(config.url);
tab = tp.getComponent(id);
if (!tab) {

tab = tp.addTab({ id: id.toString(),
title: config.title,
iconCls: config.icon || 'icon-applicationdouble',
closable: true,
autoLoad: {
showMask: true,
url: config.url,
mode: 'iframe',
noCache: true,
maskMsg: "Loading " + config.title + "...",
scripts: true,
passParentSize: config.passParentSize
}
});

}
else {
tp.setActiveTab(tab);
Ext.get(tab.tabEl).frame();
}
}
</script>

</head>
<body>
@Html.X().ResourceManager()

================================================== =============

The second question is : How would I define an ascx control containing Ext.Net controls defined inside an Ext border control that resides in the _layout.cshtml body section and then create a tab view from a view page in mvc razor?