Tuesday 14 January 2014

C#.Net(Array And ArrayList)

In This Post We Will discuss about array and array list.Difference b/w Array and arraylist

Difference B/w Array And Array list
1.In Array We have to mention the size of array.But in Array List We Don't Need To Mention the size
2.In Array it is used for homogenous type of data.Arraylist Use for heterogeneous type of data.

C#.Net(Control Statements Syntax)

     Control Statements Syntax
Divided Into Two Parts
1.Branching
2.Looping
      1.Branching:
            1.If
                 If(Condition)
                {
                }
            2.If-else
                   If(Condition)
                  {
                  }
                   else
                  {
                  }
             3.Nested If-else
                   If(Condition)
                    {
                    }
                   else if(condition)
                    {
                    }
                    else
                     {
                     }
              4.Switch
                    Switch(a)
                       {
                     Case 0:
                    //Instructions;
                     break;
                      Case 1:
                    //Instructions;
                     break;

                        }
 2.Looping
        1.For
                for(initilization ; condition ; increment/decrement)
                  {
                             //Body(Instructions)
                  }
          2.While(conditions)
               {
                  //Body(Instructions)
                }
          3.Do-While
            do
             {
              }
             while(condition);

C#.Net(Input integer And String Values)

If U see First C#.Net Program then U Know How To Select New Console  Application.Now In This Post I Want To Tell U How to input integer and string Value In C#


Starting C#.Net(Basic Output display program)

To Make program in C#(C Sharp) We Will Use The IDE(Integrated Development Environment) Visual Studio . I Am Using Visual Studio 2010 . U can Use Which Visual Studio Version U have

Steps
1.When Open The VS Then Go to File->New->Project
2.When Click On Project A Window Will Open
3.
 
  Through this hello will display on black screen when execute it

Monday 6 January 2014

Query string(Pass multiple value from one page to next page)

1.First page from where value input
2.coding on button event
3.Next Page
4.Coding on page load event of next.aspx page




Friday 3 January 2014

Add Session in asp.net application and use that session in another pages

So In this i will add session in login page and i will use that session in another pages.{before this i want to tell you that your data should be present in the table  which you are accesing at login time}
Steps
1.firstly create Login Page
2.coding on button event

3.Now use this session in next page ....
        front end page
    

        back end page
                                        

Now run from the login page.....

Interview Question Of Sql Queries

1.Insert Data Into Table
insert into tablename values('column value','column value');

2.Update data Into Table
Update tablename set columnname='value' where columnname='value';

3.Delete Data FromTable
Delete from tablename where columnname='value';

4.Select data from table
select * from tablename  if want to access particular column then write select columnname1,columnname2 from tablename

5.Select Last Five Records From Table
select top(5) * from signup(tablename) order by  id(Column name) desc
Column Name data type should be int and its identity specification property should be Yes(In Sql Server)

6.If you want to see the unique record from the column in table
select distinct(column name)  fromtablename

7.Check The No Of Records in a table
select count(*) from tablename

8.Sum the salary column in table
select SUM(column name) from tablename





Update data from the grid view

In This I will Tell you how to update data from the grid view.....
   Steps:

1.So Firstly take Gridview control from the data control
2.After that go to Edit Column(Click On it)
3.Window is open(Select Template from it and Add It(Acc to your column required means to say number of  column you want to add in grid view Add that no of template field))
4.
5.Now click on edit template field
 6.Write coding in the source page
7.Add the edit button go to the proprties of gridview...there is Autogenrate edit proprty ... True it
8.Now add the events of edit,update,cancel......go to the events of gridview
9.Do code on these events

So Now Your Data is updated......one thing that should kept in your mind..in web config file your connection should be make.....if you want to check how to make connection in web.config file check this link
http://checkdotnetsolution.blogspot.in/2014/01/how-to-insert-data-into-databasesql.html



Thursday 2 January 2014

Login Through DataBase(Sql Server)

Now In this tutorial we will login through that data which is Inserted into the database...See first How to insert data(http://checkdotnetsolution.blogspot.in/2014/01/how-to-insert-data-into-databasesql.html).
So For Login Case Firstly Data Should be present into the database-> table
1.Make Front Page For Login
2.Now Code On Double click of button event
Web.config file code is same which is used in http://checkdotnetsolution.blogspot.in/2014/01/how-to-insert-data-into-databasesql.html
Now Your Login will Work

How to insert data into database(Sql Server)

Today I will tell you how you can send data from your application(Front End Page) to backend(Sql Server) database.I Will make Front End With Asp.net Controls.And I will Use the Classes Of Ado.net .With the help of Ado.net Classes will can send data from front end to sql(Structure query language) database.
                                  Steps To Insert Data
1.Make Front End
2.Now make the database(I will Use the external database(i.e sql server 2008))


3.Now Code on the Button click event(Double click on the button which is in Front end page after double click on the page a page is opened that page extension is(.aspx.cs)).Now Code on it
                                       
4.Go To Web.Config File Add The Selected Code

You Record Inserted.......