--

...

--

...

--

...

--

...

--

....

Monday, 16 November 2020

Introduction to C# .NET

It  is  pure  object  oriented  programming  language.  Also  it  is  Event Driven Programming Language.

It is case sensitive.

It is part of Microsoft Visual Studio .Net.Microsoft Visual Studio .Net  comprises of the following :

  1. VB.Net
  2. C#.Net
  3. ASP.Net
  4. VC++.Net
  5. VJ++.Net
  6. VF#.Net

After inventing Windows OS Microsoft invented Visual Studio group of languages  to  create  softwares  which  can  use  Windows  OS  features and concepts. 

It contains the following languages:

  1. Visual Basic
  2. Visual Inerdev (for ASP-Active Server Pages)
  3. Visual C++
  4. Visual Fox-pro
and many more

After  the  Visual  Studio  Microsoft  upgraded  Visual  Studio  to  support OOP concepts and created Visual Studio .Net.

Thursday, 30 August 2018

About Array

Often in programming we need to store values of similar data type, to do so we might require multiple variable declarations and that would be tedious to deal with. 
To ease this task, we can take help of Arrays.
  • An Array is a collection of similar type of values or similar Data Types.
  • Data is stored in continuous memory locations.
  • These values can be referred by single variable and the index number (position number).
  • The index number always starts with ZERO.
  • To access the elements of array we use FOR loop.
In C Language we have:
  •     Single Dimentional Array
    • <datatype>  <varName>[<size>];
  •     Multi Dimentional Array
    • <datatype>  <varName>[<size>][<size>]...; 
Limitations:
  • Size or count of values must be known in prior.
  • Arrays are not resizable
  • This leads to memory wastage if requirement is less than the size 
Array based on Data Type
  • Character Array: When we need to store more than one character or string we have use 'char' type array. These arrays have a terminating called 'null' character represented as '\0'. We can create a character array in following ways:
                    A)  Declaration of Array:
                        char Arr1[20];
                        initialization of array:
                        Arr1[0] = 'a';    Arr1[1] = 'b';
                        Arr1[2] = 'c';    Arr1[3] = 'd';
                        Arr1[4] = 'e';    Arr1[5] = 'f';
                        Arr1[6] = '\0';

                    B)  Declaration and Initialization(array initializer):
                        char Arr2[]={'a','b','c','d','e','f','\0'};

                    B)  Declaration and Initialization(string initializer):
                        char Arr3[]="Vilas";

                    D) Declaration and then accepting string from user:
                        char Arr3[20];
                        scanf("%s", arr3);  //don't use '&' before 'arr3'


  • Integer Array : These arrays don't have terminator character. The last element (value) of the array would have index number as SIZE -1. Ways to create 'int' type array:
           A)  Declaration of Array:
                    int arr1[6];
                    initialization of array:
                    arr1[0] = 11;    arr1[1] = 22;
                    arr1[2] = 33;    arr1[3] = 5;
                    arr1[4] = 65;    arr1[5] = 8;

           B)  Declaration and Initialization(Array initializer):
                   int arr2[]={10, 20, 30, 40, 50, 60};

           C) Declaration and then accepting numbers from user:
                   int arr3[5];
                   int i;
                   for(i=0; i<5; i++)
                        scanf("%d", &arr3[i]);


            *** Same is for 'float' and 'double'

Friday, 10 August 2018

Advantages of C Programming


  1. As C Programming is a middle level language, it includes the features of both high level and low level languages.
  2. It can be used for low-level programming, such as scripting for drivers and kernels and it also supports functions of high level programming languages.
  3. C is a structured programming language which allows a complex program to be broken into simpler programs called functions. It also allows free movement of data across these functions.
  4. C language is case-sensitive.
  5. C is highly portable and is used for system programming application which form a major part of Windows, UNIX and Linux operating system.
  6. C is a general purpose programming language and can efficiently work on enterprise applications, games, graphics, and applications requiring calculations.
  7. C language has a rich library which provides a number of built-in functions. It also offers dynamic memory allocation.

Saturday, 4 August 2018

Print the Pyramid using C Programming

Dear friends here you will understand how to print the Pyramid in C Programming. Diagram shown below is designed as per the logic we want to thing before writing the program and then which code we have to use and where we have to place the code.
If any one want more explanation please write a in comment box.

Thursday, 26 July 2018

Creating DataBase in Microsoft SQL Server

Click on Start Button in Windows and Select SQL Server Management Studio.

Give the Server Name (Machine Name
Select Windows Authentication :
User Name, Password is not required, they will be disabled, SQL Server starts directly using User Name, Password supplied while log-in to Windows.
SQL Server Authentication :  
User Name, Password will be enabled, SQL Server asks for User Name and Password, type the user name and password specified while installing the SQL Server Software.
Using user name and password of OS we can login or user name and password available inside SQL Server.
 After doing any one operation click on Connect
Now it will connect to SQL Server and the following screen will appear.

Now to create Database then right click on Database -> Click on New Database ->Type database name ->Click on Ok.




Monday, 16 July 2018

What is C Programming

  1. C is a programming language developed at AT&T’s Bell laboratory of USA in 1972.
  2. It was designed and written by Dennis Ritchie. 
  3. Without any advertisement ‘C’ reputation spreads.
  4. Ritchie seems to be surprised that so many programmers preferred C to older languages like FORTRAN or PL / I.
  5. Possibly why C seems so popular is because it is reliable, easy and simple to use. 
  6. C was meant to be friendly, capable and reliable.

Where C Stands

Problem oriented languages and High Level language.

  • These languages have been designed to give a better programming efficiency i.e. program development.
  • Examples of languages falling in this category are FORTRAN, BASIC, PASCLE etc....

Machine oriented language are low level languages.

  • These languages have been designed to give a better machine efficiency i.e. faster program execution.
  • Example of languages falling in this category are Assembly Languages and machine Language.

C stands in between these two categories. That’s why it is often called a middle level language, since it was designed to have both: A relatively good programming efficiency as compared to machine oriented language and a relatively good machine efficiency as compared to problem oriented languages.

Wednesday, 20 June 2018

Introduction to ASP.NET


To create dynamic web pages. To create web pages on the fly. To create web sites or web applications.
Group of web pages is called web site. Every web page is of two types.
  1. Client side/static page
  2. Server side/dynamic page

Internet : Network of networks is called Internet. Largest network in the world is Internet. The Internet is operated using Web Sites. On Internet we have to place the web site, then only we can access from any where. First of all we have to purchase web space, register it on our name, provide user name and password to it, then create web site and place it on your web space.
To operate Internet we require the following :
  1. Computer
  2. Internet Connection (supplied by ISP)
  3. Telephone line
  4. Browser Software (Internet Explorer/Netscape Navigator/Opera/Neo planet/ Chrome/ Mozilla Firefox)
  5. Modem (Modulator / Demodulator-Dialup/Broadband, Internal/External)

ISP : Internet Service Provider (BSNL/MTNL/VSNL/RELIANCE/AIRTEL/TATAINDICOM/ AIRCEL/ HUTCH/ UNINOR/ IDEA/ VODAFONE)
Internet Connections :
  1. Dial-up
  2. ISDN (Integrated Subscriber Dialup Network)
  3. Broadband
  4. Cable modem
  5. Leased line

Accessing internet :
  1. Start Internet connection
  2. Start Internet Explorer, type the URL (Uniform Resource Locator) of the web site you like to see in address bar then press enter. URL Example :
For Example : 'http://www.rediffmail.com'
In the above example
  • HTTP stands for (Hypertext Transfer Protocol)
  • WWW stands for (World Wide Web)
  • rediffmail.com stands for domain name, .com is domain code.

Benefits of ASP.NET


It represents an exciting new platform for creating web sites with the .net framework, using any .net language. The benefits are,
Structure ASP.NET brings structure back into programming by offering a code-behind page, which separates the client-side script and HTML from the server-side code.
Layout control Using web forms in ASP.NET and positioning controls such as text boxes and buttons is easy, and VS.NET will create the appropriate HTML code for the target browser that is selected. For instance, to be compatible with most browsers, VS.NET will create tables, and nested tables to obtain the desired positioning of the controls. If the application only needs to be compatible with the latest version of Internet Explorer, then VS.NET will position the controls using DHTML.
Compiled Code ASP.NET solves the problem of running interpreted script by compiling the server-side code into IL (Intermediate Language). IL code is significantly faster than interpreted script.
Early binding ASP.NET also uses early binding when making calls to COM components, resulting in faster performance.
Security ASP.NET has an enhanced security infrastructure that can be quickly configured and programmed to authenticate and authorize Web site users.
Performance ASP.NET contains performance enhancements, such as page and data caching.
Diagnostics ASP.NET offers an enhanced tracing and debugging option, which will save time when you are ready to get the system running.
Session State ASP.NET has an improved session object. Session state can be configured to be shared among all servers in a web farm.
.NET Framework Since ASP.NET uses the .NET framework, ASP.NET also inherits the features of the .NET Framework, such as:
  • Automatic memory cleanup via garbage collection
  • Cross language inheritance
  • A large object-oriented base class library
  • The use of ADO.NET to access database
Web Services ASP.NET also provides the web service infrastructure. It is possible to create a web service with very few lines of code.

Friday, 8 June 2018

Creating ConnectionString by using 2-Tier and 3-Tire Architecture


Sunday, 3 June 2018

How to Find ConnectionString

From the Visual Studio Screen go to Server Explorer

From the Server Explorer Right Click on Data Connection and then Select Add Connection
Give the Server Name then Select Database and then Click on Advance Button
After that you will find the Connection String

Saturday, 26 May 2018

Cookies


Cookies

It is small amount of info stored by web server on client machine.

Types of Cookies :

  • Temperary Cookie (the info will be lost when user closes the browser or logout).
  • Permanent Cookie(persistent cookie) : the info will be stored on client machine till the time specified).

For Example

UserName
Password
protected void Button1_Click(object sender, EventArgs e)
{
     ///////////////////////// temporary cookie creation
    HttpCookie cook = new HttpCookie("vilas");
    DateTime dt = DateTime.Now;
    cook.Values.Add("currentdatetime", dt.ToString());
    cook.Values.Add("username", TextBox1.Text);
    cook.Values.Add("password", TextBox2.Text);
    Response.Cookies.Add(cook);
    Label3.Text = "temp cookie created";
}
protected void Button2_Click(object sender, EventArgs e)
{
          ///////////////////////// permanent cookie creation
          HttpCookie cook = new HttpCookie("conco");
          DateTime dt = DateTime.Now;
          cook.Values.Add("currentdatetime", dt.ToString());
          cook.Values.Add("username", TextBox1.Text);
          cook.Values.Add("password", TextBox2.Text);

          ///////////////////////// for permanant
          cook.Expires = dt.AddMinutes(10);
          // DateTime dt1=new DateTime(10,31,2014);
         // cook.Expires = dt1;
          Response.Cookies.Add(cook);
          Label3.Text = "perm cookie created";
}
protected void Button3_Click(object sender, EventArgs e)
{
          ///////////////////////// reading cookie
          HttpCookie cook = Request.Cookies["conco"];
          if (cook != null)
          {
          string dat, user, pass;
          dat = cook.Values["currentdatetime"].ToString();
          user = cook.Values["username"].ToString();
          pass = cook.Values["password"].ToString();
          Label3.Text="date time of creation of cookie is " + d + "--"+"user name is " + u + "--"+"password is " + p + "--";
          }
          else
          {
          Label3.Text = "no cookie present";
          }
}

Introduction to C# .NET

It  is  pure  object  oriented  programming  language.  Also  it  is  Event Driven Programming Language. It is case sensitive. ...