About version numbering:
Versions numbered 1.0.3.x are to be used with the latest official release of Castle, namely Release Candidate 3.
You can download that from Castle website
Versions numbered 1.0.4.x are to be used with the bleeding-edge trunk of Castle.
You can download trunk builds from Castle's build server.
Core Assemblies:
| Version | Works with | Debug | Release |
|---|---|---|---|
| 1.0.3.386 | Castle RC3 | AspView-1.0.3.386-Debug.zip | AspView-1.0.3.386-Release.zip |
| 1.0.4.400 | Castle Trunk | AspView-1.0.4.400-Debug.zip | AspView-1.0.4.400-Release.zip |
Utilities:
ViewUpgrader
This utility is for migrating an existing AspView site to the new syntax.
How to use: put ViewUpgrader.exe in your site's root and run it. It would iterate over your views, mark your properties sections with a <aspView:properties> tag, and convert your sub views attributes statements from name="value" to name="<%=value %>".
Changes in rev. 400:
Nothing really. Just making AspView compatible with the latest changes in MonoRail's internals.
Changes in rev. 394:
-
Nested layouts
in the controller:
[Layout("Outer, Inner")]
public class MyController ...
that would render the selected view in the "Inner" layout, which in turn would be rendered inside "Outer" layout. -
supporting layout from a custom location, using "\" prefix,
so [Layout("default")] would use "layouts\default.aspx" for the layout,
while [Layout("\other\default")] would use "\other\default.aspx" -
rendering html-encoded properties:
use the syntax <%#var%>, or ${var} to render html-encoded strings.
Note that using the ${var} syntax is totally without intellisense, and the <%#var%> syntax have lame intellisense (unless you use Resharper) -
Embedded script blocks:
If you need to create a class level method, or a class level variable, use a script tag, with runat="server" attribute:
Example:
<script runat="server">
string DoubleIt(string s)
{
return s + s;
}
</script>
<span><%=DoubleIt("Message")%></span>
Would render "MessageMessage"
Changes in rev. 386:
- Issue CONTRIB-85 is solved. The issue was about VCompile being case sensitive about 'bin' folder.
This change is both for the trunk and RC3 versions - The prepcompiler was completely rewritten. First noticable change is the ability to set a custom base class for views. You do that by extending AspViewBase with YourBaseClass. You should also create another class and name it YourBaseClassAtDesignTime. This class would inherit from ViewAtDesignTime and will add marker properties and methods so the text editor would pick up the extensions.
Example:
public class MyBaseView : AspViewBase { public MyHelper MyHelper { get { return (MyHelper)Properties["MyHelper"]; } } } public class MyBaseViewAtDesignTime : ViewAtDesignTime { public MyHelper MyHelper { get { throw new NotImplementedException(); } } }and setting it up in the view like that:<%Page Language="C#" Inherits="MyBaseViewAtDesignTime"%>