September 2004 - Posts

Usually you get the roles that a user belongs to from the database on a Application_AuthenticateRequest which is defined in the global.asax. The following blog post, features a method to only hit the database once: 

http://weblogs.asp.net/cazzu/archive/2004/07/21/FormsAuthRoles.aspx

PS. there is a caveat to doing it this way. The cookie size must be under 4k or it wont get saved.

with 2 comment(s)
Filed under:
Short tutorial / article on Codesmith: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnhcvs04/html/vs04e5.asp

This is a nice firefox only paypal spoof :)

Nice to have a look at the possibility's of XUL:

http://www.nd.edu/~jsmith30/xul/test/spoof.html

 

1. .NET v1.1 wasn't included in win xp sp2.

2. weblogs.asp.net went from full text to about 3 lines of text per item on the website and in the RSS feed.
Causing a lot of read more links.

with 5 comment(s)
Filed under:

Found on evolt.org it has some very nice tips:

Ten_CSS_tricks_you_may_not_know

My favorite:

6. CSS box model hack alternative

The box model hack is used to fix a rendering problem in pre-IE 6 browsers, where by the border and padding are included in the width of an element, as opposed to added on. For example, when specifying the dimensions of a container you might use the following CSS rule:

.box
{
width: 100px
border: 5px
padding: 20px
}

This CSS rule would be applied to:

...

This means that the total width of the box is 150px (100px width + two 5px borders + two 20px paddings) in all browsers except pre-IE 6 versions. In these browsers the total width would be just 100px, with the padding and border widths being incorporated into this width. The box model hack can be used to fix this, but this can get really messy.

A simple alternative is to use this CSS:

.box
{
width: 150px
}

.box div {
border: 5px
padding: 20px
}

And the new HTML would be:

...

Perfect! Now the box width will always be 150px, regardless of the browser!

Filed under: