|
<%@ 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>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.