Showing posts with label DotNet. Show all posts
Showing posts with label DotNet. Show all posts

Desktop Application vs Web Application

1 comments
An Application is a set of instructions to achieve a particular task for end users. An application can be divided into two general classes: Desktop Application and Web Application.

  1. Desktop Application: The application developed to run in a particular system is called Desktop Application.
  2. Web Application: The application developed to run in server system so that it will be run on different client systems is called Web Application or Web-based Applications.

Benefits of a Web Application:


  • A web application is any application that uses a web browser as a client. The application can be as simple as a message board or a guest sign-in book on a website, or as complex as a word processor or a spreadsheet.
  • A web application relieves the developer of the responsibility of building a client for a specific type of computer or a specific operating system. Since the client runs in a web browser, the user could be using an IBM-compatible or a Mac. They can be running Windows XP or Windows Vista. They can even be using Internet Explorer or Firefox, though some applications require a specific web browser.
  • Web applications commonly use a combination of server-side script (ASP, PHP, etc) and client-side script (HTML, Javascript, etc.) to develop the application. The client-side script deals with the presentation of the information while the server-side script deals with all the hard stuff like storing and retrieving the information.
Continue Reading...

What is a Client?

0 comments
The 'client' is used in client-server environment to refer to the program the person uses to run the application. A client-server environment is one in which multiple computers share information such as entering information into a database. The 'client' is the application used to enter the information, and the 'server' is the application used to store the information.
Continue Reading...

C Sharp program to find largest of given 3 numbers

2 comments

using System;

namespace largetOfThreeNums
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, c, big;
            Console.Write("Enter First value: ");
            a = int.Parse(Console.ReadLine());
            Console.Write("Enter Second value: ");
            b = int.Parse(Console.ReadLine());
            Console.Write("Enter Third value: ");
            c = int.Parse(Console.ReadLine());
            big = a;
            if (b > big)
                big = b;
            if (c > big)
                big = c;
            Console.WriteLine("Biggest of given 3 numbers = " + big);
            Console.ReadLine();
        }
    }
}
Continue Reading...

Visual Studio Tips and Tricks!

0 comments
Editor’s Favorites
CTRL+SHIFT+B or F7 to build your solution
CTRL+] to jump between matching braces!
The IntelliSense Suggestion Box
CTRL+K+Pit re-opens the suggestion box.
CTRL+J shows only members in the IntelliSense completion list.
Format your Code
CTRL+K+D to auto-format your code
CTRL+K+C to Comment a block of code
CTRL+K+U to Uncomment a block of code
CTRL+E+D or CTRL+E+C or CTRL+E+U
CTRL+M or CTRL+L
will collapse/expand all outlining.
CTRL+M+O or CTRL+M+P to open and close all regions of code.
CTRL+K, CTRL+C/CTRL+U to comment/uncomment a selection.
Debugging
F10, F11Step Over, Step Into a statement
CTRL+ALT+H display the Thread List window.
CTRL+ALT+M display the Memory window.
CTRL+ALT+C
ALT+7
display the call stack window.
ALT+3 display the Watch window
General Keyboard shortcuts
F7Toggles between design and code views.
F9Toggles breakpoint.
F12Go to definition of a variable, object, or function.
Ctrl+Shift+7
Ctrl+Shift+8
Quickly navigate forward and backwards in the go to definition stack.
Shift+F12Find all references of a function or a variable.
Ctrl+M, Ctrl+MExpand and collapse code outlining in the editor.
Ctrl+K, Ctrl+C
Ctrl+K, Ctrl+U

Comment and uncomment line(s) of code, respectively.
Shift+Alt+EnterToggles between full screen mode and normal mode.
Ctrl+IIncremental Search.
Continue Reading...

C# program for converting a number into words (spell)

1 comments

using System;
//wirtten by Suneel Gudipati
namespace NumberToWords
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] units = new string[] { "ONE ", "TWO ", "THREE ", "FOUR ", "FIVE ", "SIX ", "SEVEN ", "EIGHT ", "NINE ", "TEN ", "ELEVEN ", "TWELEVE ", "THIRTEEN ", "FOURTEEN ", "FIFTEEN ", "SIXTEEN ", "SEVENTEEN ", "EIGHTEEN ", "NINTEEN " };
            string[] tens=new string[]{"TEN ","TWENTY ","THIRTY ","FOURTY ","FIFTY ","SIXTY ","SEVENTY ","EIGHTY ","NINTY "};
            int i,num;
            string result="";
            Console.Write("Enter number here in range 1-999 : ");
            num = int.Parse(Console.ReadLine());
            if (num >99&&num<1000)
            {
                i=num/100;
                result=units[i-1]+"HUNDRED ";
                num =num%100;
            }//if
            if (num>19&&num<100)
            {
                i=num/10;
                result =result+tens[i-1];
                num=num%10;
            }//if
            if (num<20&&num>0)
                result+=units[num-1];
            Console.WriteLine("The number you entered: "+result);
            Console.ReadLine();
        }
    }
}

Continue Reading...

Difference between .NET 2.0/3.0/3.5 Framework

8 comments

NET framework 2.0:

It brings a lot of evolution in class of the framework and re-factor control including the support of
  • Generics
  • Anonymous methods
  • Partial class
  • Null-able type
  • The new API gives a fine grain control on the behavior of the run time with regards to multithreading, memory allocation, assembly loading and more
  • Full 64-bit support for both the x64 and the IA64 hardware platforms
  • New professionalization features for ASP.NET, such as support for themes, skins and webparts.
  • .NET Micro Framework

.NET framework 3.0:

Also called WinFX, includes a new set of managed code APIs that are an integral part of Windows Vista and Windows Server 2008 operating systems and provides
  • Windows Communication Foundation (WCF), formerly called Indigo; a service-oriented messaging system which allows programs to inter-operate locally or remotely similar to web services.
  • Windows Presentation Foundation (WPF), formerly called Avalon; a new user interface subsystem and API based on XML and vector graphics, which uses 3D computer graphics hardware and Direct3D technologies.
  • Windows Workflow Foundation (WF) allows for building of task automation and integrated transactions using work-flows.
  • Windows CardSpace, formerly called InfoCard; a software component which securely stores a person's digital identities and provides a unified interface for choosing the identity for a particular transaction, such as logging in to a website

.NET framework 3.5:

It implement Linq evolution in language. So we have the folowing evolution in class:
  • Linq for SQL, XML, Dataset, Object
  • Addin system
  • p2p base class
  • Active directory
  • ASP.NET Ajax
  • Anonymous types with static type inference
  • Paging support for ADO.NET
  • ADO.NET synchronization API to synchronize local caches and server side datastores
  • Asynchronous network I/O API
  • Support for HTTP pipelining and syndication feeds.
  • New System.CodeDom namespace.
In simplly,
  • .Net framework 2.0 shipped with Visual Studio 2005
  • .Net framework 3.0 is same framework as .Net 2.0 + Windows Communication Foundation (WCF)+ Windows Presentation Foundation (WPF) + Windows Workflow Foundation (WF)
  • .Net framework 3.5 is all the above (.Net 3.0) + LINQ technologies and will ship with the next VS including VB 9.0 and C#
Note:
Earlier .NET 2.0, there have been 2 versions of .NET released. They are as follows :

  • .NET 1.0 – released on January 16, 2002.
  • .NET 1.1 – released on April 24, 2003.
  • .NET 2.0 – Released on November 7, 2005.
Continue Reading...

Software Development Life Cycle (SDLC)

19 comments
Software Development Life Cycle or SDLC is a model of a detailed plan on how to create, develop, implement and eventually fold the software. It’s a complete plan outlining how the software will be born, raised and eventually be retired from its function. Although some of the models don’t explicitly say how the program will be folded, it’s already common knowledge that software will eventually have it’s ending in a never ending world of change web, software and programming technology.

Various faces in the SDLC:
  1. Systems Investigation: In this face, identify systems problems or opportunities.
  2. Systems Analysis: In this face, how can we solve the problems.
  3. Systems Design: In this face, select and plan the best solution.
  4. Systems Implementation: In this face, place solution into effect.
  5. Systems Maintenance and Review: In this face, evaluate the results of the solutions.
Continue Reading...

What is the purpose of Server.MapPath method in Asp.Net?

0 comments

In Asp.Net Server.MapPath method maps the specified relative or virtual path to the corresponding physical path on the server. Server.MapPath takes a path as a parameter and returns the physical location on the hard drive.

Syntax #
Suppose your Text files are located at D:\project\MyProject\Files\TextFiles

If the root project directory is MyProject and the aspx file is located at root then to get the same path use code

/* physical path of TextFiles */
string TextFilePath=Server.MapPath("Files/TextFiles");
Continue Reading...

How to manage the state in ASP.Net?

0 comments

  • Using Session and Application objects to cache information.
  • Using Memory and Disk Cookies to preserve information.
  • Using hidden input fields or the URL -embedded information to pass information from one page to another.
  • Using the ViewState property of the page to set and retrieve information stored in a StateBag object.
  • Using SQL Server to store state information.
Continue Reading...

ASP.NET HTTP Handler

1 comments
  • The ASP.NET HTTP Handler – creates a file with the extension .ashx.
  • The file contains the @WebHandler directive, Imports or using statements for the required System and System.Web namespaces, a Namespace definition, and a public Class definition that implements the IHttpHandler interface.
  • Within the Class definition are the two required member definitions for
    • the ProcessRequest event and
    • the IsReusable property.
  • You mustspecify the class name and namespace before you can create this type of file.
Continue Reading...

web.config file

0 comments
  • A web.config file containing the
    • <configuration>,
    • <appSettings>, and
    • <system.web> sections.
  • Within the <system.web> section there are
    • <sessionState>,
    • <customErrors>,
    • <authentication>, and
    • <authorization> elements.
  • All the elements are commented-out by default, and contain a description of their usage and the valid values for the common attributes.
Continue Reading...

Global.asax file

0 comments
Global.asax – creates a file with the extension .asax. The file contains the @Application directive and a <script> section that contains empty event handlers for the
  • Application_Start,
  • Application_End,
  • Application_Error,
  • Session_Start, and
  • Session_End events.
Continue Reading...

Difference between Application variable and Session variable

3 comments

Application variable

  • Application variables are the variables which remain common for the whole application. Their value can be used across the whole application. 
  • Application variable will be initialized first when your application start.
  • The scope of application variable is across the session and once the variable is set, it can be accessed by any of the user logged into the application.
  • Application variables are application related used by all the user (multiple users). The state maintained in the application variables are shared by all the users. 
  • For example, if you want to count how many users visited your site use application variable.

Session variable

  • Session variables are variables which remain common for the whole application but for one particular user. They also can be used across the whole application. The scope of the session variable is just with the session and not accessible across the session.
  • Session variables are browser related used to maintain state for that particular user (single user).
  • Session variable will be reinitialize every time when user make login like
  • For example, if you want to count the current user visiting number then use session variable.

Note:

  • Application variable and session variable both are declared in Global.asax file.
  • All these methods like session start, session end, application start, application end are found in global.asax and that’s the reason global.asax is one for the whole ASP.Net application.
Continue Reading...

Indexers

0 comments
  • Indexer is a concept of using an object like an array.

    Syntax:

    <modifier> <return type> this [argument list]

  • Indexers are implemented through get and set assessors for the [] operator. . The get and set assessors are invoked as methods with the parameter list specified in the indexer declaration.
  • Indexer method name must be this.
  • One class can have only one indexer.
  • The modifier can be private, public, protected or internal.
  • Indexers must be instance-based, that is, they cannot be static i.e., C# don't have the concept of static indexers
  • A base class indexer is inherited to the derived class.
Continue Reading...

Generics

0 comments

Whenever more than one function having same functionality, then instead of writing many functions one generic function is sufficient. In Generics, data types are decided at run time.

Syntax:

public void genericName <T> (Ta, Tb)

{

Statement(s)

}

Continue Reading...

Reflection

0 comments
  • Reflection is a mechanism which is used to access Meta data information of an assembly.
  • System. Reflection can be used to browse through the Meta data information.
  • Using reflection you can also dynamically invoke methods using System.Type.Invokemember.
Continue Reading...

How can you view an assembly?

0 comments
  • You can view an assembly by using ILDASM.
  • The ILDASM converts the assembly into IL code. To run ILDASM you have to go "C:\Program Files\Microsoft Visual Studio .Net 2003\SDK\<version>\Bin\"
  • Run the ILDASM.EXE from the path you will be pooped with the ILDSAM program.
  • Click the file and browse to the respective directory for the DLL whose assembly you want to view.
Continue Reading...

How many classes can a single .Net Dll contains?

0 comments

It can contain many classes.

Continue Reading...

How’s the DLL Hell problem solved in .NET?

0 comments

Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.

Continue Reading...

Satellite Assemblies

0 comments
  • A collection of resource files (.resx) is called Satellite assembly, where a resource file stores language specific information in XML format.
  • When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
  • The namespaces to create a localized application System.Globalization, and System.Resources.
Continue Reading...
> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger