by pietman
22. February 2010 14:45
For some reason this sometimes happen when your browsing history becomes too large.
Simply click "tools", "Delete Browsing History"
or shortcut to this ...... control shift delete
1cc4f3f7-e0b8-4e26-9f79-359e2cc2cb3b|0|.0
Tags:
Errors
by pietman
22. February 2010 14:30
First you create a Web.sitemap file (similar to below)
(I save mine in my App_Data Folder -right click add new ASP.Net Folder -> App_Data)
<?xml encoding="utf-8" version="1.0" ?>
<sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode title="Main" description="login" url="~/login.aspx" roles="*" >
<siteMapNode title="Admin" description="here" url="~/Admin/home.aspx" >
<siteMapNode title="Reports" description="reports" url="~/Admin/Reports.aspx" />
</siteMapNode>
<siteMapNode title="Lab" description="here" url="~/lab/home.aspx" roles="lab" />
<siteMapNode ...... />
<siteMapNode ...... />
</siteMapNode>
</sitemap>
Please note how I have nested the Reports under the Admin tab.
If you use a SiteMapDataSource the first thing you probably want to do is to add the ShowStartingNode="false"element to the tag.
In my case it would prevent showing the "Main" menu item (which I don't want - and you probably too)
The following tag should be on the page where you want the Menu (probably your master page)
<asp:SiteMapDataSource ShowStartingNode="false" runat="server"
ID="sitemapdatasource1" SiteMapProvider="default" />
Make sure you set Orientation element in your "asp:Menu" tag to "Horizontal.
Also try to set the "StaticEnableDefaultPopOutImage" element in your "asp:Menu" tag to ="false" (this will stop the tips that point out which menus are expandable)
Thus my tag looks as follows:
<asp:Menu ID="mnuMain" runat="server" DataSourceID="sitemapdatasource1"
StaticEnableDefaultPopOutImage="false" Orientation="Horizontal" >
19aeb2f0-1437-44ad-841f-0c5b401d3cde|0|.0
Tags:
by pietman
6. February 2010 14:13
//include the following:
using System.Xml.Serialization;
public static void Save(object StoorObject, string filename)
{
XmlSerializer XS = new XmlSerializer(StoorObject.GetType());
System.IO.StreamWriter SW = new System.IO.StreamWriter(filename);
XS.Serialize(SW, StoorObject);
SW.Close();
}
public static object Load(object StoorObject, string filename)
{
XmlSerializer XS = new XmlSerializer(StoorObject.GetType());
System.IO.StreamReader SW = new System.IO.StreamReader(filename);
object o = XS.Deserialize(SW);
SW.Close();
return o;
}
ab9c595f-5435-46ab-8eb9-45a69a8f46df|0|.0
Tags: