Tuesday 9 April 2013

Dotnet Difference

ADO.NET Difference: 

http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-between-questions.html 

  1. What are the differences between DataReader and DataAdapter?

S.No DataReader DataAdapter
1 Works in Connected Mode Works in Disconnected Mode
2 Can have only one record at a time Can have more than 1 records
3 Is ForwardOnly and Readonly Can navigate front and back and editable
4 Faster Slower
  1. What are the differences between DataSet and DataReader?

S.No DataSet DataReader
1 The data store whose records have to be manipulated can be disconnected. You can read data from datareader only if the connection to data store exists.
2 You have the provision to cache data fetched from data store when using dataset. Caching of data is not possible.
3 Dataset objects have XML Support. XML Support is not provided by datareader.
4 A single dataset object can contain collection of datatable objects wherein each datatable object refers to a table in the datastore. Hence you can manipulate on multiple tables using a dataset. Datareader can read records fetched by a command object containing a single query. If you have to fetch data from multiple tables, then datareader is not advantageous when compared to dataset.
5 Using dataset, you can read the records fetched in any order. While reading records, you can iterate only in forward direction.
6 Performance wise, dataset is slow because it has multiple tables which in turn include multiple rows, columns and constraints. Datareader gives high performance and records can be fetched faster when compared to dataset.
  1. What is the difference between DataSet.Copy() and DataSet.Clone()?

S.No DataSet.Copy() DataSet.Clone()
1 DataSet.Copy() copies both the structure and data DataSet.Clone() copies the structure of the DataSet, including all DataTable schemas, relations, and constraints and it does not copy any data
  1. What are the differences between RecordSet and DataSet?

S.No RecordSet DataSet
1 RecordSet provides data of one row at an instant DataSet is a data structure which represents the complete table data at the same time
2 RecordSet always needs an Open connection to read the data from data sources DataSet needs connection only for retrieving the data. After retrieve the data connection is not necessary
3 RecordSet is able to load the structure and data of only one table at a time DataSet has the capability to store the structure and data of multiple tables at a time
4 RecordSet does not support constraints of Databases DataSet enforces data integrity by using Constraints
  1. What are the differences between ADO and ADO.Net?

S.No ADO ADO.Net
1 It is a COM based library. It is a CLR based library.
2 Classic ADO requires active connection with the data store. ADO.NET architecture works while the data store is disconnected.
3 Locking feature is available. Locking feature is not available.
4 Data is stored in binary format. Data is stored in XML.
5 XML integration is not possible. XML integration is possible.
6 It uses the object named Recordset to reference data from the data store. It uses Dataset Object for data access and representation.
7 Using Classic ADO, you can obtain information from one table or set of tables through join. You cannot fetch records from multiple tables independently. Dataset object of ADO.NET includes collection of DataTables wherein each DataTable will contain records fetched from a particular table. Hence multiple table records are maintained independently.
8 Firewall might prevent execution of Classic ADO. ADO.NET has firewall proof and its execution will never be interrupted.
9 Classic ADO architecture includes client side cursor and server side cursor. ADO.NET architecture doesn't include such cursors.
10 You cannot send multiple transactions using a single connection instance. You can send multiple transactions using a single connection instance.

     6.Difference between Typed DataSet and Untyped DataSet

S.No
Typed DataSet
Untyped DataSet
1
It provides additional methods, properties and events and thus it makes it easier to use.
It is not as easy to use as strongly typed dataset.
2
They have .xsd file (Xml Schema definition) file associated with them and do error checking regarding their schema at design time using the .xsd definitions.
They do not do error checking at the design time as they are filled at run time when the code executes.

3
We will get advantage of intelliSense in VS. NET.
We cannot get an advantage of intelliSense.
4
Performance is slower in case of strongly typed dataset.
Performance is faster in case of Untyped dataset.
5
In complex environment, strongly typed dataset's are difficult to administer.
Untyped datasets are easy to administer.

        Typed DataSets use explicit names and DataTypes for their members.
        ex:
        northwindDataSet.Products.ProductNameColumn.Caption = "pnames";


       UnTyped DataSets use table and column collections for their members
      ex:
      ds.Tables["emp"].Columns["eno"].ReadOnly=true;



    7.Difference between DataView and DataTable


S.No
DataView
DataTable
1
Read-only i.e., DataView can be used to select the data.
Read/Write i.e., Datatable can be used to edit or select or delete or insert a data.
2
Is a reference to an existing DataTable. Cannot be populated from scratch; must be instantiated with a reference to an existing DataTable.
Can be created empty and then populated
3
Data is a reference to an existing DataTable, and does not consume space.
Data takes storage space.
4
Can sort or filter rows without modifying the underlying data. Rows and columns can be hidden and revealed repeatedly.
Can add/edit/delete rows, columns, and data, and all changes are persistent.
5
Can return a DataTable version of the view
Can be cloned
6
A live reference to a DataTable; any changes in the DataTable data is immediately reflected in the view.
Is source data; does not contain references
7
Supports calculated columns, which are columns with a value calculated on the fly by combining or manipulating other columns.
Does not support calculated columns
8
Can hide or show selected columns
No row or column hiding

  8.Difference between Connected and Disconnected Environment


S.No
Connected Environment
Disconnected Environment
1
Connected Environment needs a constantly connection of user to data source while performing any operation.
Disconnected Environment does not need any connection.
2
Only one operation can be performed at a time in connection Environment.
Multiple operations can be performed.
3
DataReader is used in Connection Environment.
DataSet is used in it.
4
It is slower in speed.
Disconnected Environment has a good speed.
5
We get updated data in it.
There is a problem of dirty read.

Saturday 30 March 2013

ASP.Net State Management Techniques

Web pages rarely be stand alone. Web applications almost always need to track users who visits multiple pages, whether to provide personalization, store information about a user or to track usage for reporting purposes.
Purpose

State management is the process by which you maintain state and page information over multiple requests for the same or different pages.


Types of State Management

There are 2 types State Management:

1. Client – Side State Management
This stores information on the client's computer by embedding the information into a Web page, a uniform resource locator(url), or a cookie. The techniques available to store the state information at the client end are listed down below:

a. View State – Asp.Net uses View State to track the values in the Controls. You can add custom values to the view state. It is used by the Asp.net page framework to automatically save the values of the page and of each control just prior to rendering to the page. When the page is posted, one of the first tasks performed by page processing is to restore view state.

b. Control State – If you create a custom control that requires view state to work properly, you should use control state to ensure other developers don’t break your control by disabling view state.

c. Hidden fields – Like view state, hidden fields store data in an HTML form without displaying it in the user's browser. The data is available only when the form is processed.

d. Cookies – Cookies store a value in the user's browser that the browser sends with every page request to the same server. Cookies are the best way to store state data that must be available for multiple Web pages on a web site.

e. Query Strings - Query strings store values in the URL that are visible to the user. Use query strings when you want a user to be able to e-mail or instant message state data with a URL.

2. Server – Side State Management
a. Application State - Application State information is available to all pages, regardless of which user requests a page.

b. Session State – Session State information is available to all pages opened by a user during a single visit.

Both application state and session state information is lost when the application restarts. To persist user data between application restarts, you can store it using profile properties.

Implementation Procedure


Client – Side State Management:

View State:
The ViewState property provides a dictionary object for retaining values between multiple requests for the same page. When an ASP.NET page is processed, the current state of the page and controls is hashed into a string and saved in the page as a hidden field. If the data is too long for a single field, then ASP.NET performs view state chunking (new in ASP.NET 2.0) to split it across multiple hidden fields. The following code sample demonstrates how view state adds data as a hidden form within a Web page’s HTML:

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE” value="/wEPDwUKMTIxNDIyOTM0Mg9kFgICAw9kFgICAQ8PFgIeBFRleHQFEzQvNS8yMDA2IDE6Mzc6MTEgUE1kZGROWHn/rt75XF/pMGnqjqHlH66cdw==" />


Encrypting of the View State: You can enable view state encryption to make it more difficult for attackers and malicious users to directly read view state information. Though this adds processing overhead to the Web server, it supports in storing confidential information in view state. To configure view state encryption for an application does the following:

<Configuration>

    <system.web> 

  <pages viewStateEncryptionMode="Always"/> 

   </system.web> 

</configuration>


Alternatively, you can enable view state encryption for a specific page by setting the value in the page directive, as the following sample demonstrates:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ViewStateEncryptionMode="Always"%> 

View State is enabled by default, but if you can disable it by setting the EnableViewState property for each web control to false. This reduces the server processing time and decreases page size.
Reading and Writing Custom View State Data:
If you have a value that you’d like to keep track of while the user is visiting a single ASP.NET Web page, adding a custom value to ViewState is the most efficient and secure way to do that. However, ViewState is lost if the user visits a different Web page, so it is useful only for temporarily storing values.
Example: Determine the time of last visit to the page

// Check if View State object exists, and display it if it does

If (ViewState ["lastVisit"]!= null) 

Label1.Text = (string)ViewState["lastVisit"]; else 

Label1.Text = "lastVisit ViewState not defined."; 

// Define the ViewState object for the next page view ViewState.Add("lastVisit", DateTime.Now.ToString()); 




Control State: If you create a custom control that requires ViewState, you can use the ControlState property to store state information for your control. ControlState allows you to persist property information that is specific to a control and cannot be turned off like the ViewState property. To use control state in a custom control, your control must override the OnInit method and call the Register-RequiresControlState method during initialization and then override the SaveControl-State and LoadControlState methods.

Hidden fields: ViewState stores information in the Web page using hidden fields. Hidden fields are sent back to the server when the user submits a form; however, the information is never displayed by the Web browser (unless the user chooses to view the page source). ASP.NET allows you to create your own custom hidden fields and store values that are submitted with other form data. A HiddenField control stores a single variable in its Value property and must be explicitly added to the page. You can use hidden fields only to store information for a single page, so it is not useful for storing session data. If you use hidden fields, you must submit your pages to the server using Hypertext Transfer Protocol (HTTP) POST (which happens if the user presses a button) rather than requesting the page using HTTP GET (which happens if the user clicks a link). Unlike view state data, hidden fields have no built-in compression, encryption, hashing, or chunking, so users can view or modify data stored in hidden fields.

Cookies: Web applications can store small pieces of data in the client’s Web browser by using cookies. A cookie is a small amount of data that is stored either in a text file on the client file system (if the cookie is persistent) or in memory in the client browser session (if the cookie is temporary). The most common use of cookies is to identify a single user as he or she visits multiple Web pages.

Reading and Writing Cookies:
A Web application creates a cookie by sending it to the client as a header in an HTTP response. The Web browser then submits the same cookie to the server with every new request.
Create a cookie -> add a value to the Response.Cookies HttpCookieCollection.
Read a cookie -> read values in Request.Cookies.
Example:
// Check if cookie exists, and display it if it does 

if (Request.Cookies["lastVisit"] != null) // Encode the cookie in case the cookie contains client-side script Label1.Text = Server.HtmlEncode(Request.Cookies["lastVisit"].Value); 

else Label1.Text = "No value defined"; 

// Define the cookie for the next visit Response.Cookies["lastVisit"].Value = DateTime.Now.ToString();Response.Cookies["lastVisit"].Expires = DateTime.Now.AddDays(1); 


If you do not define the Expires property, the browser stores it in memory and the cookie is lost if the user closes his or her browser.

To delete a cookie, overwrite the cookie and set an expiration date in the past. You can’t directly delete cookies because they are stored on the client’s computer.
Controlling the Cookie Scope: By default, browsers won’t send a cookie to a Web site with a different hostname. You can control a cookie’s scope to either limit the scope to a specific folder on the Web server or expand the scope to any server in a domain. To limit the scope of a cookie to a folder, set the Path property, as the following example demonstrates:

Example:
Response.Cookies["lastVisit"].Path = "/Application1"; 


Through this the scope is limited to the “/Application1” folder that is the browser submits the cookie to any page with in this folder and not to pages in other folders even if the folder is in the same server. We can expand the scope to a particular domain using the following statement:
Example:
Response.Cookies[“lastVisit”].Domain = “Contoso”;

Storing Multiple Values in a Cookie:
Though it depends on the browser, you typically can’t store more than 20 cookies per site, and each cookie can be a maximum of 4 KB in length. To work around the 20-cookie limit, you can store multiple values in a cookie, as the following code demonstrates:
Example:

Response.Cookies["info"]["visit"].Value = DateTime.Now.ToString();

Response.Cookies["info"]["firstName"].Value = "Tony";

Response.Cookies["info"]["border"].Value = "blue";

Response.Cookies["info"].Expires = DateTime.Now.AddDays(1);


Running the code in this example sends a cookie with the following value to the Web browser:
(visit=4/5/2006 2:35:18 PM) (firstName=Tony) (border=blue)

Query Strings: Query strings are commonly used to store variables that identify specific pages, such as search terms or page numbers. A query string is information that is appended to the end of a page URL. A typical query string might look like the following real-world example:
http://support.microsoft.com/Default.aspx?kbid=315233
In this example, the URL identifies the Default.aspx page. The query string (which starts with a question mark [?]) contains a single parameter named “kbid,” and a value for that parameter, “315233.” Query strings can also have multiple parameters, such as the following real-world URL, which specifies a language and query when searching the Microsoft.com Web site:
http://search.microsoft.com/results.aspx?mkt=en-US&setlang=en-US&q=hello+world

Value Name | ASP.NET Object | Value
mkt | Request.QueryString[“mkt”] | en-US
setlang | Request.QueryString[“setlang”] | en-US
q | Request.QueryString[“q”] | hello world

Limitations for Query Strings:
1. Some Browsers and client devices impose a 2083 – character limit on the length of the URL.
2. You must submit the page using an HTTP GET command in order for query string values to be available during page processing. Therefore, you shouldn’t add query strings to button targets in forms.
3. You must manually add query string values to every hyperlink that the user might click.
Example:
Label1.Text = "User: " + Server.HtmlEncode(Request.QueryString["user"]) + 

", Prefs: " + Server.HtmlEncode(Request.QueryString["prefs"]) + 

", Page: " + Server.HtmlEncode(Request.QueryString["page"]); 


Server - Side State Management:

Application State: ASP.NET allows you to save values using application state, a global storage mechanism that is accessible from all pages in the Web application. Application state is stored in the Application key/value dictionary. Once you add your application-specific information to application state, the server manages it, and it is never exposed to the client. Application state is a great place to store information that is not user-specific. By storing it in the application state, all pages can access data from a single location in memory, rather than keeping separate copies of the data. Data stored in the Application object is not permanent and is lost any time the application is restarted.

ASP.NET provides three events that enable you to initialize Application variables (free resources when the application shuts down) and respond to Application errors:

a. Application_Start: Raised when the application starts. This is the perfect place to initialize Application variables.

b. Application_End: Raised when an application shuts down. Use this to free application resources and perform logging.

c. Application_Error: Raised when an unhandled error occurs. Use this to perform error logging.


Session State: ASP.NET allows you to save values using session state, a storage mechanism that is accessible from all pages requested by a single Web browser session. Therefore, you can use session state to store user-specific information. Session state is similar to application state, except that it is scoped to the current browser session. If different users are using your application, each user session has a different session state. In addition, if a user leaves your application and then returns later after the session timeout period, session state information is lost and a new session is created for the user. Session state is stored in the Session key/value dictionary.

You can use session state to accomplish the following tasks:
i. Uniquely identify browser or client-device requests and map them to individual session instances on the server. This allows you to track which pages a user saw on your site during a specific visit.

ii. Store session-specific data on the server for use across multiple browser or client-device requests during the same session. This is perfect for storing shopping cart information.

iii. Raise appropriate session management events. In addition, you can write application code leveraging these events.

ASP.NET session state supports several different storage options for session data:

a. InProc Stores session state in memory on the Web server. This is the default, and it offers much better performance than using the ASP.NET state service or storing state information in a database server. InProc is fine for simple applications, but robust applications that use multiple Web servers or must persist session data between application restarts should use State Server or SQLServer.

b. StateServer Stores session state in a service called the ASP.NET State Service. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm. ASP.NET State Service is included with any computer set up to run ASP.NET Web applications; however, the service is set up to start manually by default. Therefore, when configuring the ASP.NET State Service, you must set the startup type to Automatic.

c. SQLServer Stores session state in a SQL Server database. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm. On the same hardware, the ASP.NET State Service outperforms SQLServer. However, a SQL Server database offers more robust data integrity and reporting capabilities.

d. Custom Enables you to specify a custom storage provider. You also need to implement the custom storage provider.

e. Off Disables session state. You should disable session state if you are not using it to improve performance.

Advantages


Advantages of Client – Side State Management:

1. Better Scalability: With server-side state management, each client that connects to the Web server consumes memory on the Web server. If a Web site has hundreds or thousands of simultaneous users, the memory consumed by storing state management information can become a limiting factor. Pushing this burden to the clients removes that potential bottleneck.

2. Supports multiple Web servers: With client-side state management, you can distribute incoming requests across multiple Web servers with no changes to your application because the client provides all the information the Web server needs to process the request. With server-side state management, if a client switches servers in the middle of the session, the new server does not necessarily have access to the client’s state information. You can use multiple servers with server-side state management, but you need either intelligent load-balancing (to always forward requests from a client to the same server) or centralized state management (where state is stored in a central database that all Web servers access).

Advantages of Server – Side State Management:

1. Better security: Client-side state management information can be captured (either in transit or while it is stored on the client) or maliciously modified. Therefore, you should never use client-side state management to store confidential information, such as a password, authorization level, or authentication status.

2. Reduced bandwidth: If you store large amounts of state management information, sending that information back and forth to the client can increase bandwidth utilization and page load times, potentially increasing your costs and reducing scalability. The increased bandwidth usage affects mobile clients most of all, because they often have very slow connections. Instead, you should store large amounts of state management data (say, more than 1 KB) on the server.

Reference URLs

#. www.awprofessional.com/articles/article.asp?p=31842
#. www.microsoft.com/.../shared/asp/view.asp?url=/seminar/en/20050201_statemanagement/manifest.xml&rate=2
#. scottwater.com/blog/archive/asp-net-state-management-tips/
#. aspalliance.com/1066_Session_State_Management

Friday 29 March 2013

How to give self introduction in interview


 THIS POINTS ARE VERY MAIN PART OF SELF INTRODUCTION:








1. Start with a smile on your face & give details about Name, Place after greeting.
2. If necessary only add your family details.
3. Tell about your educational details.
4. Share about why you want to do JOB so.
5. About your Project in Brief.
6. The person who inspired you a lot.
7. Then about your intrests/hobbies.
8. Also how you will spend your time when you are free.
9. Tell about skills.
10. Then conclude by saying THANKS to the Person who is listining to you.

FOR EXAMPLE:1

Well, good morning sir/madam,

Hi Friends, my name is shivaji rao patil from Hyderabad. I parsuing my B-Tech in stream of computer science and engineering from nict college, xxx with aggregate 65%. I have completed HSC from GURU BASAVA junior college with aggregate of 6% and SSC from Pratibha we. N. High school with aggregate 73%.

We are five in my family. My father is a private employee and my mother is a homemaker. I have two sibblings.

About my achievements, I never made any achievements at state level. But in my schooling I got certificate in singing level competition. In college I got NSS certificate which I participated as volunteer in my 1st year of engineering.

My strengths are hardworker, self motivating and dedicated towards my work. And also I'm a good learner as well as teacher.

My hobbies are making crafts, painting, surfing net.

My short term goal to get placed in well reputed company.

My long term goal to palced in any mnc company and give my best to your.

Organisation.

As a fresher, I don't have any working experience, but I will prove once the opportunity comes.

FOR EXAMPLE:2

Good morning mam/sir.

It's my pleasure to introduce my self..well, I'm Rehana born and raised in Anantapur.
I have done my schooling in Little flower Montessori English Medium High School with 77% ,then i did my plus 12 from S.S.B.N junior college with 77.7% and now i'm pursuing my final year B.tech from Anantha Lakshmi Institute of Technology and Sciences Anantapur with an aggregate of 78.33%

My strengths are my attitude that i like to take challenges that I CAN do it,my way of thinking that i take both success and failure in a balanced manner..
I dont like to say weakness but i like to say scope for improvement that is i wont leave any ask in completely,i believe in my self and my hard work and i want perfection in every thing.

My short term goal is i want a such a platform where i can grow my career along with the organisation growth like yours and
My Long term goal is i want to be one of the reason for the success of the organisation and i want to seeyour organisation as a bench mark to other organisations.

My ethic is "i never neglect an opportunity for my improvement".

thats all about me sir....thank you for giving me such a wonderful oppurtunity.

FOR EXAMPLE:3

My name is XXX and I am from Chennai. I am currently studying Finance and Economics at Hong Kong University. I was raised in Bengalu and when I was 18 I moved to Hong Kong to take my university study. Last year I went to London to join the school's exchange program. During my exchange I went backpacking with other backpackers from all over the world to other countries across Europe. It was a fun experience. I think I have been fortunate enough to be able to live in different parts of the world and thus be able to broaden my horizon.

I have a strong interest in banking and financial services industry. The reason is I'd like to leverage my detail-oriented mind and apply the skills and knowledge that I have attained throughout my degree courses. I see myself as a people-oriented and over-achiever person. I demonstrated this through working in various group projects with different types of people in which I had been able to perform well.

I would like to be part of your company to further develop myself in banking field and to use my capabilities to serve both your company and your clients.

(Note: all locations here are fiction, the rest is based on my factual experience even though some parts have been distorted a little bit. The purpose is just to let you know a structure of self-introduction that I think is good and appropriate.)

FOR EXAMPLE:4
Good morning sir/madam,

It's my pleasure to introduce myself. I'm sunil from delhi. Currently, I'm pursing my final year electronics and communication engineering from meri college of engg n tech with an aggregate of 79%. I completed my +2 from government co edu senior secondary school also I have done my schooling from same school
My father is a government employee and my mother is house wife

My strengths are my attitude that I like to take challenges that I CAN do it, self motivated person, self disciplined I am a good team player as well as has a good ability to lead the team. I can adopt to any kind of environment. I am a good listener and quick learner.

My weakness is I can not tolrete any leniency in work
My short term goal is I want a such a platform where I can grow my career along with the organisation growth like yours and.

My Long term goal is I want to be one of the reason for the success of the organisation and I want to see your organisation as a bench mark to other organisations

Thats all about me sir. Thank you for giving me such a wonderful oppurtunity.

FOR EXAMPLE:5

Good morning sir/madam;

Firstly I would like to thank you for giving me this opportunity and it's my pleasure to introduce myself.

I am arun from erode tamil nadu. I completed my BCOM with CA from arulanadar college it affiliated to Madurai kamaraj university with 64.5% and i have completed my +2 from government higher secondary school with 63.58%.I have done my schooling from same school.

Telling me about my family my mother working in school my father was passed away And coming to my hobbies are net surfing, playing chess.

I am fresher and have no work experience in any company.

My strength is i can adopt easily in any type of environment.

My short term goal is to get placed in a reputed company like yours which will give me an opportunity to enhance my skills and Knowledge.

My long term goal would be reaching the higher position in your company.


That's all about me sir .Thank you for giving such a wonderful opportunity.

FOR EXAMPLE:6

Good morning mam/sir.

It's my pleasure to introduce my self. Well, I'm VINITHA born and raised in Anantapur.

I have done my schooling in Little flower Montessori English Medium High School with, then I did my plus 12 from NARAYANA JR COLLEGE and now I'm pursuing my final year B-Tech from CBIT.

My strengths are my attitude that I like to take challenges that I CAN do it, my way of thinking that I take both success and failure in a balanced manner.

I don't like to say weakness but I like to say scope for improvement that is I won't leave any ask in completely, I believe in my self and my hard work and I want perfection in every thing.

My short term goal is I want a such a platform where I can grow my career along with the organisation growth like yours and.

My Long term goal is I want to be one of the reason for the success of the organisation and I want to seeyour organisation as a bench mark to other organisations.

My ethic is "i never neglect an opportunity for my improvement".

Thats all about me sir. Thank you for giving me such a wonderful oppurtunity.

FOR EXAMPLE:7

Good morning sir/madam;

Firstly I would like to thank you for giving me this opportunity and it's my pleasure to introduce myself.

I am satyagiri from A.P. I have completed my M.C.A from swami ramananda college of engineering with an aggregate of 74%.I completed my UG from Ekashila college it affiliated to kakatiya university with 60% and i have completed my +2 from s.v college with 65%.I have done my schooling from Z.P,H.S high school.

Telling me about my family bock ground my father is former and my mother is helping to my father.we are four siblings my elder brother is teacher and my younger brothers are studying.And coming to my hobbies are net surfing,playing cricket.

I am fresher and have no work experience in any company.

My strength is i can adopt easily in any type of environment.

My short term goal is to get placed in a reputed company like yours which will give me an opportunity to enhance my skills and Knowledge.

MY long term goal is i want to be one of the reason for success of the organization and i want to be one of responsible person in organization growth.

that's all about me sir .Thank you for giving such a wonderful opportunity.

FOR EXAMPLE:8


Good evening sir/madam
I am glad to be here for this interview.thanks for given this chance to show myself.

My name is XXX from YYY.I have a B.Tech degree with a major in Information Technology field.Graduated in XXX college in 2011 and secured 74% mark in degree.

I am seeking an opportunity to work as a software engineer.As i have the necessary skills you specified for the educational qualification and having solution based thinking in every tasks,I will work in time and fulfill the tasks allotted to me.

I was not achieve big,but i was the one of the good in the environment i met.I got prizes for my academic excellence.

My good thing is positive thinking.My negative point is i would like to do everything with myself,its from my childhood habit and i get some more experience by being like this.

My goal:i always wants to finish my every day work correctly.It will lead me to a good position.

My roll model is YYYY because of his effective use of time and the way communicate with others.

Telling about my family background,My mum is working as a school teacher and my sister is studying BE.As my mum and relatives are educated,i bought up by them well discipline and correct in my work.

I am expecting to be a colleague in someday.

FOR EXAMPLE:9

Good morning sir/madam,
I am Mukesh Kumar,Basically I am from Bihar.I belongs to Vaishali District.I am belongs to a family where discipline does matter.My father is in police department and my mother is housewife. I have 2 brother and 2 sister.

About My qualification, I have completed Bachelor of engg. from cec bilaspur in the year 2011. I have done +2 from Kendriya Vidyalaya Jawaharnagar located at Bihar and I have done schooling from sitamarhi high school which is near at my hometown.

A part from that I have also completed MCP Certtification in ASP.NET with version 2.0.

I am a good listener as well as good learner.I can hard work to achieve my targets in time. I am self confident,positive attitude and patience.

My hobbies including to help my mother in her some time work and listining music.

My short term goal is to join your organization and enhance my skills. My long term goal is to see your organization at peak level where I am one of the person responsible for it.

About My achievements I have choosen vice president of my college in my final year and I have scored 83% in MCP certification.

My weakness is fear,But I will overcome from this.

FOR EXAMPLE:10


(This is not a big introduction.Try to say it and you will see it finishes in less than 2mins.But I occasionally added some comments with in () to give you some tips.I hope it helps)

Hello Sir/mam;

It's my pleasure to introduce myself to you.My name is Yashaswini Mohanty.I was born and raised in Cuttack city of Odisha.I completed my education from there as well(Not mentioning the details of education,because it's already on my cv).

I have a beautiful family of five members.My father is a retired Govt Employee.My mother is a homemaker.I have two elder sisters and both of them work in different MNCs.

My hobbies are drawing,painting,reading books(say this only if you read some nice motivational books.They might ask you to name some of the books you read. Then if you will say something like Harry Potter and Twilight,it will show how childish you are.)

My achievements are,I was selected as the class representative in my college.(Shows your managerial skills).I self taught myself photoshop and participated in many online digital art competitions.I was selected in State Talent Scholarship Examinations conducted by World Health & Education services of Odisha.I have participated in many blood donation camps by Red Cross Organizations.

My greatest strength are I'm a fast learner,smart and hard worker.(Mention Hardwork after Smart work.They always need organized smart worker than hard but dumb workers.I was told this by a HR and member of interview panel board.)My greatest weakness are my love for food,but I'm trying to overcome that.(You can add something really unimportant thing that won't affect your work.Or you can say my weakness I don't have any real time experience in the software field as I'm a fresher.As said by Jothi Boss,but different interviewers can take different meaning out of it.)

My short term goal is to be placed in a MNC and my long term goal is to be the member of the team that is responsible for the success of the organization I'm placed in.

That is all about myself and thank you for giving me an opportunity to introduce myself to you.

Ps:-I tried to keep this informative as well as short and free of errors,but if did some mistakes,then let me know :)

Saturday 23 March 2013

Display sum of columns total in gridview footer in asp.net

Introduction:

In this article I will explain how to display the sum of total of columns in gridview footer   using asp.net.



Description:

I have a one gridview with multiple rows and columns and for that gridview paging also has enabled now my requirement I need to display sum of all the columns (Total) in gridview footer for that I have used gridview row databound condition this functionality will work for paging enabled gridview also. Before proceed to functionality first we need to design one table in database and give name EmployeeSalary

 

ColumnName
DataType
EmpID
Int(set identity property=true)
EmpName
varchar(50)
Location
varchar(50)
Amount
varchar(50)
After completion table creation enter some dummy and design your aspx page like this

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Show gridview Rows Total in </title>
<style type="text/css">
.Gridview
{
font-family:Verdana;
font-size:10pt;
font-weight:normal;
color:black;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="gvEmp" CssClass="Gridview" HeaderStyle-BackColor="#61A6F8" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold ="true" DataKeyNames="EmpID" runat="server" ShowFooter="true" AllowPaging="true" PageSize="5" AutoGenerateColumns="false" DataSourceID ="sqldsEmp" onrowdatabound="gvEmp_RowDataBound">
<FooterStyle Font-Bold="true" BackColor="#61A6F8" ForeColor="black" />
<Columns>
<asp:BoundField DataField="EmpID" HeaderText="Emp ID" />
<asp:BoundField DataField="EmpName" HeaderText="Emp Name" />
<asp:TemplateField  HeaderText="Location">
<ItemTemplate>
<asp:Label ID="lblLocation" runat="server" Text='<%#Eval("Location") %>'/>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="lbltxttotal" runat="server" Text="Total Amount"/>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Amount">
<ItemTemplate>
<asp:Label ID="lblamount" runat="server" Text='<%# Eval("Amount") %>'/>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="lblTotal" runat="server" />
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="sqldsEmp" runat="server" SelectCommand="select * from EmployeeSalary" ConnectionString="<%$ ConnectionStrings:dbconnection %>">
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
 
After completion of aspx page write the following code in codebehind
int total = 0;
protected void gvEmp_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType==DataControlRowType.DataRow)
{
total += Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Amount"));
}
if(e.Row.RowType==DataControlRowType.Footer)
{
Label lblamount = (Label)e.Row.FindControl("lblTotal");
lblamount.Text = total.ToString();
}
}
After that set your database connection in web.config like this because we are using this connection in our sqldatasource to get the data from database
<connectionStrings>
<add name="dbconnection" connectionString="Data Source=SureshDasari;Integrated Security=true;Initial Catalog=MySampleDB"/>
</connectionStrings >

Demo