Friday, June 24, 2011

To rotate text in all browsers is not easy with simple CSS and HTML with out using image. But it's do able and it's really simple. Let's have a text at -45 degree in left top corner of a web page. That will look something like in the image.

First we need simple HTML for the text so let's get that out of the way.

Now this is for only -45 degree angle to understand how the text rotation work in IE you need to know what is M11, M12, M21 and M22. Well they are the value for the angle in our case it is -45 degree value of cos theta and sign theta. You can get them with your scientific calculator or use the web Scientific Calculator. But how do we know what value to put in for M11, M12, M21 and M22.
well here you go.

M11 = COS THETA,
M12 = SIN THETA,
M21 = -SIN THETA,
M22 = COS THETA

above order will give us -45 degree angel but let's say if we want 45 degree angle then we will use this.

M11 = COS THETA,
M12 = -SIN THETA,
M21 = SIN THETA,
M22 = COS THETA

Only we need to change the M12 and M21 value to +/-.
Hope this helped with rotating text in IE. NO NEED TO USE IMAGES

Thursday, June 23, 2011

To delete duplicates form a table is very easy. Before you delete any thing from the table make sure to back up the DB or the table before running this command. There is the SQL statement that will do the trick.

DELETE
FROM [table_name]
WHERE [Column_ID] NOT IN
(
SELECT MAX([Column_ID])
FROM [table_name]
GROUP BY [Column name])

Where [Column name] is the column that you think have duplicate value. Give it a shot!!

Wednesday, June 22, 2011

If you are getting the WebResource.axd and ScriptResource.axd Java script error on your asp.net page and you are using the IIS 7.0 with IIS URL rewrite.

There is a very good chance that you have a URL rewrite rule that Enforce lowercase URLs. If that is the case then make sure that you a condition in there that will not force the WebResource.axd and ScripResource.axd to lowercase. Once you add the Rule form the IIS GUI. It will look some thing like this in the web.config file.

The Other reason could be that you have a page that looks something like this http://www.url.com/page.aspx?id=1 and have a rule that will rewrite the URL to http://www.url.com/1 that will give you the WebResource.axd and ScriptResource.axd error. Make sure that when you rewrite the URL include the page name too. some thing like this http://www.url.com/page/1. That will fix the issue too.