The asp.net login control in IE8 doesn't look great. The spacing between the username and password boxes is no existant. Two ways of sorting it:
1. Convert it to a template and insert your own css
2. Using the following in the code behind
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
CType(aspnet_login.FindControl("UserName"), TextBox).Attributes.Add("style", "margin-bottom: 6px; margin-left: 2px;")
CType(aspnet_login.FindControl("Password"), TextBox).Attributes.Add("style", "margin-left: 2px;")
End Sub
Alternatively Microsoft could update the .net framework?!?
Thursday, 7 January 2010
Wednesday, 6 January 2010
'cannot create file' download error in safari on MAC
When you download in safari on the MAC you can get an error message 'cannot create file'. Many posts mention permissions on the folder you are downloading to but the problem I had was that the harddrive didn't have enough space for the file being downloaded. When I made some space the error went away and the file downloaded. Good error message Apple!
Labels:
cannot create file,
download,
MAC,
safari
Friday, 12 June 2009
Fix the web server port in Visual Studio
You can fix the port the web server uses in VS 2008 by clicking F4 or From the menu 'View' --> 'Properties Window'. The change 'Use dynamic ports' to false and this will allow you to change the port number (which is disabled when you first come in to the window). I use port 50000 fyi.
Wednesday, 8 April 2009
Redirects with IIS
Moving a website from one domain to another or from a sub domain to a new domain can be nervous at the best of times without the worry of your search engine ranking. The best way of overcoming this is to use 301 redirect (even google rcommends it under its Google-friendly sites). In IIS this is done on the 'Home directory' tab in the properties of the website. Check the 'A redirection to a URL' radiobutton and then complete the web address below and check 'A permanent redirection for this resource'. You will find that when you visit the old domain you will automatically we send to the new one you have just specified.
This is also useful if you have code based on a certain web address or licenses for components that work off a certain web address and you want people arriving at http://blacksnow.co.uk/ to go to http://www.blacksnow.co.uk/ instead.
This is also useful if you have code based on a certain web address or licenses for components that work off a certain web address and you want people arriving at http://blacksnow.co.uk/ to go to http://www.blacksnow.co.uk/ instead.
Labels:
301 redirect,
IIS,
redirect to www address
Monday, 9 March 2009
Quite often it is not very clear on how to install your new skin in Dotnetnuke. DNN needs you to login with the host account. Then in DNN 4.9 click 'skins' on the host menu and then 'upload skin' from the dropdown menu next to the skin header. You need to point the 'browse' button to the zip file that contains your skin. This is often inside a number of zip files if you have purchased the skin from a vendor, so you will have to extract them first.
Monday, 2 March 2009
SQL Inline statements
Thought I'd post a quicky on SQL inline statements. Before I would create a variable and then assign a value depending on a CASE statement. But after a brief try I solved a problem with dates using an inline case statement. Converting the minute datepart to a string means that 5 past the hour becomes just 5 and doesn't look write in date strings. So i wanted any single numbers to be prefixed with zero. Here it is:
CONVERT(nVARCHAR,CreatedDate,103) + ' @ ' + CONVERT(nVARCHAR,DATEPART(Hh, CreatedDate)) + ':' + CASE WHEN LEN(CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate))) = 1 THEN '0' + CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) ELSE CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) END AS CreatedDate
CONVERT(nVARCHAR,CreatedDate,103) + ' @ ' + CONVERT(nVARCHAR,DATEPART(Hh, CreatedDate)) + ':' + CASE WHEN LEN(CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate))) = 1 THEN '0' + CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) ELSE CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) END AS CreatedDate
Labels:
Case Statements,
Inline,
SQL Inline Statements,
SQL Server
Friday, 27 February 2009
Silverlight, the beginnings
I have been playing with silverlight this afternoon. Nice touches, learnt loads but some annoying things.
The error message 'AG_E_PARSER_BAD_PROPERTY_VALUE' means you have a referenced a method in your xaml code without it existing in your xaml.vb code, really helpful error message!
Also why does Microsoft feel the need to mess with certain properties? The listbox for example is now not .enabled but .isenabled. Maybe someone can shed some light on this?
So with the first application built and being beta tested we can now explore this technology a little more.
The error message 'AG_E_PARSER_BAD_PROPERTY_VALUE' means you have a referenced a method in your xaml code without it existing in your xaml.vb code, really helpful error message!
Also why does Microsoft feel the need to mess with certain properties? The listbox for example is now not .enabled but .isenabled. Maybe someone can shed some light on this?
So with the first application built and being beta tested we can now explore this technology a little more.
Subscribe to:
Posts (Atom)