Monday, March 23, 2009

flv player

Flv Player


function createPlayer(theFile, arg)
{
var s = new SWFObject("Controls/mediaplayer.swf","thePlayerId","350","255","7");
s.addParam("allowfullscreen","true");
s.addVariable("file",theFile);
s.addVariable("width","350");
s.addVariable("height","255");
s.addVariable("wmode","opaque");
s.addVariable("autoscroll","true");
s.addVariable("allowscriptaccess","true");
s.addVariable("wmode","opaque");
s.addVariable("bufferlength","10");
s.addVariable("displayheight","230");
s.addVariable("allowfullscreen","true");
s.addVariable("autostart","true");
s.addVariable("shuffle","false");
s.addVariable("enablejs","true");
s.addVariable("javascriptid","thePlayerId");
s.write("divmsndbc"); }';

For Details View: flv video Playing videos with Flv Player

Tuesday, March 10, 2009

Load user data once with an HttpModule

A couple of years ago, when I was less focused, finished with my book and completely unmotivated to develop anything useful for my own non-day job projects, I struggled trying to shoehorn my apps into the ASP.NET Membership and Profile API's. Probably because of my lack of experience, I became very frustrated at the point where the objects started to relate to the data.

It occurred to me fairly recently that these systems provide a level of abstraction that makes sense in terms of data storage, but you still have to do a fair amount of work in your providers to make sure you aren't pounding the data store. That means caching, of course, but you still might be creating objects in several places (handlers, the page, user controls, etc.), and each time you're going to the well, whether it be by way of the caching mechanism you create or going to the data store.

So why cache at all? Why not get the data once, early in the request cycle, and go back to it when you need it? Oddly enough, it was good old fashioned FormsAuth that made me think of this, where in ASP.NET v1.x we would look up the user and roles, probably in an HttpModule, and access that data from where ever.

For Details View : http://www.uberasp.net/getarticle.aspx?id=51

Thursday, March 5, 2009

Difference b/w union and union all

Often people forget or misunderstand the difference between UNION and the UNION ALL keywords in a query.
UNION ALL
SELECT NOW = GETDATE()
UNION ALL
SELECT NOW = GETDATE()
This gives us the entire 'set' of data, both queries are executed, note, they are executed serially and not in parallel, the order the queries are executed is not determined; so, you never get a situation where the top query is parallelised with the bottom query; the query components themselves may be executed in parallel and combined as the last step.
Output (notice there are two rows that are identical, this is because GETDATE() gives a consistent value across the entire query rather than consistency at each query within the UNION construct.

NOW-----------------------2006-06-29 08:01:48.937
-----------------------2006-06-29 08:01:48.937
For Detail View : http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/06/29/849.aspx

Wednesday, March 4, 2009

Learn CSS

This article isn't meant to give you a complete and thorough overview of CSS, but should give you a practical foundation for working with CSS in templates and learning more in the future.

Basic CSS Rules
CSS code is structured differently than HTML. You can think of CSS code as a list of rules. First you have to state what you're making the rule for (the "selector"). Then, you list out the different properties that you want to change. It's pretty simple!

selector {
property1: value;
property2: value;
}

Like with HTML, you can format CSS however you want. It can be in one long line, or split up into several lines with tabs for readability.

A selector can be an HTML element, a custom class, or a reference to an ID.

If the selector is an HTML element (such as p, h1, a, and so on), you can use it to set properties for every instance of that HTML element on the page.

The selector can also be a custom class. Custom classes can be named almost anything you want, and start with a period—.redtext,.nomargin, and.bigheading are all examples of classes. In the HTML code, you can apply these classes with the class attribute, like this:

For Details View : http://expression.microsoft.com/en-us/dd326792.aspx

Earn Money ! Affiliate Program
Open Directory Project at dmoz.org