Monday, November 25, 2013

Unrecognized tag prefix or device filter 'asp'

SOLVED FINALLY!!!

I kept receiving the warning. Unrecognized tag prefix or device filter 'asp' in my Visual Studio 2012, 2013.

I tried deleting everything in the bin directory, obj directory, deleting the suo file and the same thing.  Nothing worked.  I then realized that this WAS using master pages and I just had removed the content tags so that I could test right away.

When I put the standard html in the index.aspx page like so, everything was able to build fine.

<html>
<head>
<title></title>
</head>
<body>

My Code block here

</body>
</html>

Monday, March 18, 2013

Convert String Date to SQL Date

If you need to convert a date that is in a string format:

03/18/13

into a SQL Server Date so that you can process it, ORDER BY, etc.. then do the following:

CAST(HIRE as Datetime)

where HIRE is a date in string format. If you want to display the date in a particular format, then just CONVERT it to the format you want:

CONVERT(CHAR(10),CAST(HIRE as Datetime),101) as Hire_Date

The CHAR(10) saves space for 10 characters and the 101 is one of the formats available. I didn't use VARCHAR because the field is exactly 10 characters.  See the link below for a format you want to use if you don't like the 101 format (mm/dd/yyyy)




http://msdn.microsoft.com/en-us/library/ms187928.aspx