Was writing some XSLT for an Umbraco site recently, needed a copyright block in the footer so thought i’d just use the standard © syntax to add the copyright symbol, ©. When I tried to save the file, I got…
Stopping client side validation and postbacks
A couple of ways to stop client side validation firing, especially when using non asp.net controls: Set the onclick event of the image/button etc to be onclick=”return false;” then instead of using the onclick event to fire a method, use…
Redirect your user to their starting point when validation errors occur
Ever had a long webpage with validation that fails on postback but returns the user to the top of the page instead of where you want them? Annoying isnt it. Well in .Net Framework 2.0 (yes it’s been there a…
Preparing an asp.net master page for print only view – stripping out css etc
Searching google turned up nothing on this so did some digging in MSDN and worked out a method of disabling all the style sheets, javascript etc to produce a text only page: 1/ Add a content block to your master…
URL Rewriting in Asp.net using URLRewriter
One way to get yourselves rated better in the search engines is to get rid of the basic aspx page and replace it with something much more descriptive so this article goes on how to use URLrewriting in your project.
Add META keywords and Description in ASP.NET (DigitalColony.com)
Add META keywords and Description in ASP.NET Here is the syntax for programmatically adding META tags to an ASP.NET 2.0 page. HtmlMeta metaDesc = new HtmlMeta(); metaDesc.Name = “description”; metaDesc.Content = “Tips on roasting coffee at home”; Page.Header.Controls.Add(metaDesc); HtmlMeta metaKey…
My Photography Website – http://www.simonantony.co.uk
I’ve developed a new website using asp.net in c# to promote my photography business covering weddings,portraits, parties, events, corporates etc – visit the site and let me know your thoughts: http://www.simonantony.co.uk
Dotnet Charting
I was looking for some suitable dotnet charting components/code and came across the following three articles. http://www.c-sharpcorner.com/UploadFile/pseabury/2DCharting11152005052210AM/2DCharting.aspx http://www.c-sharpcorner.com/UploadFile/steve_hall/drawinglinechart02072007053420AM/drawinglinechart.aspx http://www.c-sharpcorner.com/UploadFile/jodonnell/ChartingInGDIplus11192005063716AM/ChartingInGDIplus.aspx Heres a screenshot of the one i’m using:
Exception Handling the nice way
I’ve knocked up a simple project that demonstrates a few things, namely: Avoiding file locking issues when writing to a logfile using recursion Dealing with Unhandled Exceptions globally Writing this data to a local log file The source code is…