Skip to content

Commit

Permalink
Added README and extra asp.net example.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.codehaus.org/boo/trunk@1362 2c1201b4-01cd-e047-a400-b836ae1fbc61
  • Loading branch information
Ian MacLean committed Jan 6, 2005
1 parent 0449e2b commit b569ac6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
30 changes: 30 additions & 0 deletions examples/asp.net/Calendar.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script language="Boo" runat="server">
def Calendar1Selected(Sender as System.Object, E as EventArgs):
Label1.Text = 'Boo for .NET says you picked ' + Calendar1.SelectedDate.ToString('D')
def Button1Click(Sender as System.Object, E as EventArgs) :
Calendar1.VisibleDate = System.Convert.ToDateTime(Edit1.Text)
Label1.Text = 'Boo for .NET says you set ' + Calendar1.VisibleDate.ToString('D')
</script>

<body style="font:18pt Verdana">
<form runat="server">
<center>
<h1>Boo for .NET running in ASP.NET</h1>
<p>Please pick a date</p>
<asp:Calendar id="Calendar1" runat="server" ForeColor="#0000FF" BackColor="#FFFFCC"
OnSelectionChanged="Calendar1Selected">
<TodayDayStyle Font-Bold="True"/>
<NextPrevStyle ForeColor="#FFFFCC"/>
<DayHeaderStyle BackColor="#FFCC66"/>
<SelectedDayStyle ForeColor="Black" BackColor="#CCCCFF"/>
<TitleStyle Font-Size="14pt" Font-Bold="True" ForeColor="#FFFFCC" BackColor="#990000"/>
<OtherMonthDayStyle ForeColor="#CC9966"/>
</asp:Calendar>
<p><asp:TextBox id="Edit1" width=200 runat="server"/>
<asp:Button text="Set date" id="Button1" OnClick="Button1Click" runat="server" />
</p>
<p><asp:Label id="Label1" runat="server"/></p>
</center>
</form>
</body>
33 changes: 33 additions & 0 deletions src/Boo.CodeDom/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Boo.CodeDom
===========

Using boo with code gen tools like xsd:

xsd.exe test.xsd /d /l:"Boo.CodeDom.BooCodeProvider, Boo.CodeDom, Version=1.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67"

Boo.CodeDom.dll and its dependencies will need to be registered for this to work.


Recognizing Boo as a script language in asp.net

The first step in getting support for ASP.NET is making sure it recognizes Boo as a scripting language, and knows how to invoke the Boo compiler for the various ASP file types.

ASP.NET will look for a web.config file in the root of whatever virtual directories you set up for IIS or the webserver of your choice. Here are the contents of this file for using Boo as a scripting language with ASP.NET.

<configuration>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="Boo.CodeDom" />
</assemblies>
<compilers>
<compiler language="Boo" extension=".boo"
type="Boo.CodeDom.BooCodeProvider, Boo.CodeDom" />
</compilers>
</compilation>
</system.web>
</configuration>

For more information on the web configuration file, see MSDN.

for examples of asp.net using Boo see the examples\asp.net folder.

0 comments on commit b569ac6

Please sign in to comment.