Showing posts with label Microsoft Technology. Show all posts
Showing posts with label Microsoft Technology. Show all posts

Saturday, 6 February 2016

Page.IsValid and Page.Validate in Asp.net

After validating we may thing that we have built a secure application but a hacker could disable JavaScript and bypass all our validators ! This is where the Page.Validate() method and more importantly, the Page.IsValid property come in.
Page.IsValid is a property to check whether page validation succeeded or not

The Page.Validate() method is fired automatically by controls that have the CausesValidation property set to true. Note that the Button control’s CausesValidation property is true by default.

We should check this property only after calling the Page. Validate () method, or set the CausesValidation property to true which is by default true for button control.

Example :

protected void btnLogin_Click(object sender, EventArgs e)
{
    Page.Validate(); //optional here because it is required only if buttons's  CausesValidation property is set to false but it is true by default

    if (!Page.IsValid)
    {
        return;
    }     
    //write your login code here
}

Saturday, 5 January 2013

TODO comments in Visual Studio


TODO comments allow you to tell Visual Studio to maintain a central list of tasks, which it reads from many different places in your code. The Task List is a floating window that shows all the TODO comments in your project.

To open the list, go to View menu > Task List




Friday, 4 January 2013

CABINET FILE (.cab)


In Microsoft program development, a cabinet is a single file created to hold a number of compressed files. During installation of a program, the compressed files in a cabinet are decompressed and copied to an appropriate directory for the user. A cabinet file usually has the file name suffix of ".cab".

Sunday, 9 December 2012

MDI Vs SDI Vs TDI


 MDI (Multiple Document Interface) : One parent window and many child windows. Eg: Visual Studio : Here you have Toolbox windows, editor window, errors windows, solution explorer window, properties windows, etc inside the main window.

SDI (Single Document Interface): One window, no child windows. Eg. Notepad, Windows Explorer, IE6, in these applications only one window acts as an interface.

TDI (Tabbed Document Interface): Multiple windows are arranges as tabs. Eg: Firefox, IE7 or higher, etc.

In Windows Forms or WPF, we can create any of these interfaces.

Friday, 23 November 2012

Compile .NET project/solution using Visual Studio command prompt:


Compile .NET project/solution using Visual Studio command prompt:

msbuild myproject.csproj

or

msbuild mysolution.sln

Why .net cant become a platform independent language...


Why .net cant become a platform independent language...

The CLI (short for Common Language Infrastructure) is a standard, and as such it is designed to be mostly platform-independent. Here, platform refers to the underlying computer architecture, including the operating system.

.NET is Microsoft's principal implementation of the CLI and runs only on Windows systems. Therefore, .NET is not platform-independent.

Mono is also an implementation of the CLI, but one designed to work on different platforms such as Linux and Windows. Mono is definitely more platform-independent than .NET.

Wednesday, 21 November 2012

DIFFERENCE BETWEEN SILVERLIGHT AND WPF


DIFFERENCE BETWEEN SILVERLIGHT AND WPF

Silverlight and Windows Presentation Foundation (WPF) are 2 different products from Microsoft, but has lot of overlap. Silverlight is a sub set of WPF in terms of features and functionality.

Silverlight is a Microsoft technology, competing with Adobes Flash and is meant for developing rich browser based internet applications.

WPF is a Microsoft technology meant for developing enhanced graphics applications for desktop platform. In addition, WPF applications can be hosted on web browsers which offers rich graphics features for web applications. Web Browser Appliactions (WBA) developed on WPF technology uses XAML to host user interface for browser applications. XAML stands for eXtended Application Markup Language which is a new declarative programming model from Microsoft. XAML files are hosted as descrete files in the Web server, but are downloaded to the browsers and converted to user interface by the .NET runtime in the client browsers.

WPF runs on .NET runtime and developers can take advantage of the rich .NET Framework and WPF libraries to build really cool windows applications. WPF supports 3-D graphics, complex animations, hardware acceleration etc.

Difference between Virtual Path, Absolute Path, Relative path And Physical Path


Virtual Path
 To create a web app in IIS we can place our folder containing application in C:\inetpub\wwwroot or we can point to a location where the application is, like D:\MyApp. When we point an app to another location, then we specify this path. So the app in IIS is pointing to this virtual path.

Absolute Path
When we refer to a location from root like C:\Documents\MyFolder, it is absolute path.

Relative path
When we refer to a location relative where we currently are, it is called relative path. For example, say currently you are at Documents folder in C:\Documents, to refer to MyFolder you have two choices: Absolute (C:\Documents\MyFolder) or relative (\MyFolder).

Physical Path 
In ASP.NET physical path refers to the absolute path in terms of windows. In web applications we refer to the web path, which for a web application starts from "/" (root) which is the folder that contains the application. But that root folder must be in IIS, so the path like C:\inetpub\wwwroot\myapp is the physical path.

Thursday, 30 August 2012

Microsoft DreamSpark For Students

DreamSpark puts some of the world’s most powerful software in the hands of students and educators