Monday, June 23, 2014

Date And Time in Master Page Using Java Script

<head runat="server">
<title>JavaScript display current time on webpage</title>
<script type="text/javascript">
function ShowCurrentTime() {
var dt = new Date();
document.getElementById("lblTime").innerHTML = dt.toLocaleTimeString();
window.setTimeout("ShowCurrentTime()", 1000); // Here 1000(milliseconds) means one 1 Sec  
}
</script>
</head>
<body onload="ShowCurrentTime()">
<form id="form1" runat="server">
<div>
JavaScript Display current time second by second.
<label id="lblTime" style=" font-weight:bold"></label>
</div>
</form>
</body>

</html>

What is CTS (Common Type System) ?

The common type system defines how types are declared, used, and managed in the runtime, and is also an important part of the runtime's support for cross-language integration. The common type system performs the following functions:
Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution.
Provides an object-oriented model that supports the complete implementation of many programming languages.
Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.

What’s SingleCall activation mode used for?

If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.

What is .Net Framework?

.Net Framework provides a foundation upon which .net application and xml webservices are built and executed.

Does C# support multiple inheritance?

No, use interfaces instead.

What's the difference between login controls and Forms authentication?

Login controls are an easy way to implement Forms authentication without having to write any code. For example, the Login control performs the same functions you would normally perform when using the FormsAuthentication class—prompt for user credentials, validate them, and issue the authentication ticket—but with all the functionality wrapped in a control that you can just drag from the Toolbox in Visual Studio. Under the covers, the login control uses the FormsAuthentication class (for example, to issue the authentication ticket) and ASP.NET membership (to validate the user credentials). Naturally, you can still use Forms authentication yourself, and applications you have that currently use it will continue to run.

What is .Net Platform?

Microsoft .NET is a software development platform based on virtual machine architecture. Dot Net Platform is:
Language Independent – dot net application can be developed different languages (such as C#, VB, C++, etc.)
Platform Independent – dot net application can be run on any operating system which has .net framework installed.
Hardware Independent – dot net application can run on any hardware configuration
It allows us to build windows based application, web based application, web service, mobile application, etc.

What is Postback?

When an action occurs (like button click), the page containing all the controls within the tag performs an HTTP POST, while having itself as the target URL. This is called Postback.

What is CLR (Common Language Runtime)?

CLR provides a environment in which program are executed, it activate object, perform security check on them, lay them out in the memory, execute them and garbage collect them.
The common Language Runtime (CLR) a rich set of features for cross-language development and deployment. CLR supports both Object Oriented Languages as well as procedural languages. CLR provides security, garbage collection, cross language exception handling, cross language inheritance and so on.

What is Component?

It is a set pre-compiled class, which is reusable. For now, just stick to it at the end of article you will practically understand how it is reusable piece of code.