From: Dion O. <dol...@us...> - 2005-12-09 10:38:34
|
Update of /cvsroot/magicajax/magicajax/Examples/ExampleSite (.NET 2.0 only) In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28883/magicajax/Examples/ExampleSite (.NET 2.0 only) Added Files: Tag: STABLE Default.aspx MasterPage.master Web.Config Web.sitemap readme.txt Log Message: Added example site for .NET 2.0 --- NEW FILE: Web.Config --- <?xml version="1.0"?> <configuration> <configSections> <section name="magicAjax" type="MagicAjax.Configuration.MagicAjaxSectionHandler, MagicAjax"/> </configSections> <magicAjax tracing="false"> <pageStore/> </magicAjax> <system.web> <authentication mode="Forms" /> <pages> <controls> <add namespace="MagicAjax.UI.Controls" assembly="MagicAjax" tagPrefix="ajax"/> <add src="~/webparts/Logo.ascx" tagPrefix="uc1" tagName="Logo"/> <add src="~/webparts/Calendar.ascx" tagPrefix="uc1" tagName="Calendar"/> </controls> </pages> <webParts> <personalization defaultProvider="SessionPersonalizationProvider"> <providers> <clear/> <add name="SessionPersonalizationProvider" type="SessionPersonalizationProvider" applicationName="/"/> </providers> </personalization> </webParts> <httpModules> <add name="MagicAjaxModule" type="MagicAjax.MagicAjaxModule, MagicAjax"/> </httpModules> <compilation debug="true" /> </system.web> </configuration> --- NEW FILE: Web.sitemap --- <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title="" description=""> <siteMapNode url="examples/Basic.aspx" title="1. Basic controls using MagicAjax" description="" /> <siteMapNode url="examples/DataGrid.aspx" title="2. DataGrid using MagicAjax" description="" /> <siteMapNode url="examples/MasterDetail.aspx" title="3. GridView & DetailsView" description="" /> <siteMapNode url="examples/WebParts.aspx" title="4. WebPartManager using MagicAjax" description="" /> <siteMapNode url="examples/Wizard.aspx" title="5. Wizard control using MagicAjax" description="" /> <siteMapNode url="examples/CallbackTimer.aspx" title="6. Windows Processes (using Callback Timer)" description="" /> </siteMapNode> </siteMap> --- NEW FILE: MasterPage.master --- <%@ Master Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <style type="text/css"> body { font-family:verdana; font-size:small; margin-top: 0px; } fieldset { width: 700px; padding:10px 10px; } legend { padding:10px 0px 10px 0px; } </style> </head> <body> <form id="form1" runat="server"> <fieldset> <legend><b>MagicAjax.NET Examples for ASP.NET 2.0</b> (.NET version <%= System.Environment.Version %>)<br />Please select one of the demo pages:</legend> <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" /> <asp:Menu ID="Menu1" DataSourceID="SiteMapDataSource1" runat="server" StaticSelectedStyle-BorderStyle="Dotted" StaticSelectedStyle-BorderWidth="2px" StaticSelectedStyle-BorderColor="Green" StaticSelectedStyle-Font-Bold="true" /> </fieldset> <hr style="border-style:dashed; border-color:black;" /> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" /> <ajax:ajaxpanel ID="AjaxSourcePanel" runat="server"> <br /><hr style="border-style:dashed; border-color:black;" /> <asp:LinkButton ID="ShowSource" runat="server" Text="Show Source" OnClick="ShowSource_Click" /> <pre runat="server" id="SourceSpan" style="background-color:PapayaWhip" /> </ajax:ajaxpanel> </form> </body> </html> <script language="C#" runat="server"> private void Page_Load(object sender, EventArgs e) { AjaxSourcePanel.Visible = !Request.RawUrl.ToLowerInvariant().EndsWith("/default.aspx"); } protected void ShowSource_Click(object sender, EventArgs e) { //read current aspx source, and put in SourceSpan SourceSpan.InnerHtml = HttpUtility.HtmlEncode(System.IO.File.ReadAllText(Request.PhysicalPath).Replace("\t", " ")); } </script> --- NEW FILE: readme.txt --- Step 1: create a virtual dir in IIS, and map to this folder note: make sure the virtual dir runs with .NET 2.0. Step 2: place MagicAjax.dll in the Bin folder Now you should be able to run the demo pages --- NEW FILE: Default.aspx --- <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" %> |