A very useful statement to check if a constraint exists before do something to it. Note, we can never edit a constraint before deleting it and re-create. SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='dbo' AND CONSTRAINT_NAME='FK_37_Page_FK' AND TABLE_NAME='PageContent'
Ever wanted to create a gradient image dynamically? This can easily be done using C# with the following snipplet of code. We can also specify the width, height, gradient direction (horizontal or vertical), and the two colors. By using LinearGradientMode class, a beautiful gradient image can be drawn in a sec.
Having a working sitemap in an ASP.NET application can't be anymore important. You can use it for navigations, breadcrumbs, etc. The default web.sitemap file is an XML file which provides the root node of the site, the SiteMapProvider used, and tracks the provider objects. System.Web.SiteMap inherits from System.Object. The default provider XMLSiteMapProvider works through the Web.sitemap. Besides being useful for site navigation, the sitemap also provides a easy way for search engines to look for pages on the site.
I found something very interesting to know this morning, that is Firefox's always shown fonts in web page a little differently than IE browsers. IE tends to show fonts more smooth and nice. There's actually a way to change the settings so that Firefox could show fonts and lines more nicely like Internet Explorer. To do that...
For some reason, DataBinder.Eval(Container.DataItem, "id") will not work in li tag within the item template of a repeater. I had to use this: ((System.Data.DataRow)Container.DataItem)["id"].ToString()
Doroton, a leading adelaide based food manufacturer specialising in wholeselling french tarts & patisserie has contracted Xplore to power their website. The website will showcase their wide range of popular products for leads and enquiries.
UserControls are great, particularly in making the code more eye friendly, seperating big bunch of codes into different parts and be able to re-use them throughout the application. However, there are times when we need to reference something in the parent page or control from the usercontrol level. That's when I had an issue today, and finally solved it using the brilliant delegate.
A very useful regular expression for validation Australian wide phone number, including mobile phones. This would accepts all forms of Australian phone numbers in different formats (area code in brackets, no area code, spaces between 2-3 and 6-7th digits, +61 international dialing code).
Have been playing a lot with a number of WYSIWYG text editors, such as RadEditor and many other free ones, but the one that I liked the most would be FCKEditor, which is open source editor, written in Javascripts and support a wide number of languages like PHP, ASP, JAVA, .NET, CFM, etc. It's extremely easy to integrate, especially in .NET
I have been playing around with a free datagrid control available, called FlexiGrid. It has to be one of the very best grid control available as open source. Having a very elegant user interface and very easy to integrate and customised codes, we could integrate FlexiGrid into any existing applications.