Wednesday, April 23, 2008

Usefull Tips for Interview Questions for Experienced

1. Tell me about yourself and your past experience?
This is one of the most commonly asked interview questions and it is generally used as an icebreaker. Unfortunately, people tend too talk too long and too much. You should try to allow 1-3 minutes for this question. You should cover your background, what you currently do, your assets, your education- subjects studied, choice of university, degree, and current relevant studies, a summary of your career to date, and key achievements.
2. What are your strengths and weaknesses?
Pick a weakness that could also be consider strength. "Sometimes I'm overly concerned with doing a good job and my boss tells me I drive myself too hard." Then mention your strengths: your ability to get the job done efficiently and on time; your pride in your work. Or also you can tell, my strength is my flexibility. As director of operations at a startup company, I've had to deal with and handle changes and new policies constantly. As far as weaknesses, I really enjoy my work, and sometimes I put in too much time on some projects. But by being aware of my tendency, I have learned to work smarter.
3. Why are you leaving your current job?
Forget about the fact that you hate your boss and your co-workers drive you crazy. Instead, say, "I'm ready to take on more responsibilities and learn more, but the opportunities at my current job are limited. Or I've set some goals for myself and my career, and unfortunately I'm at a standstill in my current situation. I have begun to explore options available before I spend too much time in a job where I can't advance. My goal is to continue to take on new responsibilities and be a key contributor to the success of an online venture."
4. Why do you change jobs so often?
"Mainly to learn and advance. I understand there's a lot of room for growth here, and I hope to stay a long time if I'm offered the job."
5. Did you get along with your previous boss?
If you didn't, and know you can't use her as a reference, be candid but not bitter or complaining. "She's very professional and taught me a lot, and I'm grateful for that. But I would have liked more responsibilities than I was offered.
6. What did you like/dislike about your previous manager?
The interviewer is trying to establish how you interact with authority, what characteristics you admire and what you dislike in line managers. Managers have a job to do and staff that acknowledges authority is more likely to fit in than those who don't. The interviewer will be able to judge from your response if you can carry out reasonable requests and understand the role of a line manager. You should emphasise good traits such as the ability to give clear direction, inspire staff, act as a mentor, always encourages staff to do their best and overcome obstacles, and stands up for staff when right. Dislikes should be avoided and you can actually say that you didn’t really dislike anything but you do understand that managers do have to make unpopular decisions sometimes.
7. If we phoned your previous employer/manager, what would they tell us about you?
A common question asked at interviews. It puts you on the spot and first reactions are interesting. The interviewer would like to hear that the former employer would re-employ you and you were reliable, dependable, got on well with others, and could work unsupervised. Other comments would indicate that you were flexible with hours, had a good attitude, and picked up new things quickly. He doesn't want to hear that there were personality clashes, that you didn't get on, was unreliable, lacked integrity, or needed close supervision.
8. What do you know about our company?
Nothing impresses an interviewer more than detailed answers to this question. It shows you have taken initiative to research the people and company. Discussing details of the Board of Directors, company subsidiaries, countries in which the company operates, its products, its key people, as well as statistics relating to turnover, number of employees, trends in the industry, and profitability will score points with even the most stubborn recruiters. These details are on record in the company’s portfolio or your local library. You can request any general information and brochures from the company secretary prior to the interview. Your local library will hold industry surveys or “Key Notes” reports on the industry. You can request a company prospectus or its last annual accounts if the company is listed on any of the stock exchanges. See if the company has a web site and visit it for more information. Follow any links to similar sites to view competitors or get an industry overview. If you know someone who has worked there, ask him about the company and its culture. If you used an agency to find you the position, their staff will probably have information about the company on file or they can find out about it or its key officers for you. If the recruitment agency has placed candidates with the target company before, they could advise you about the recruitment process and interview style. You may be offered the opportunity to be shown around the company on an open day or as part of recruitment fair or a pre-interview tour. Use this opportunity to talk to people and gather other intelligence that may be useful in the interview.
9. If you lack experience, what do you have to offer?
Quite often a candidate may be new to a role as in a graduate trainee or a school leaver applying for the job for the first time. It's catch 22- you have no experience so why should they hire you? If you have good grades, talk about how they are indicative of your potential to learn quickly and achieve results. You can change the ballpark and talk about any transferable skills or characteristics you may have from your last job. Be prepared to justify the characteristics with examples of how you have demonstrated them in the past. You can select what's appropriate out of the following: passion, loyalty, dedication, good communication skills, ability to deal with a wide range of people, initiative, independence, drive, good oral and written skills, literacy, numeracy, presentation skills, ability to close deals, ability to make openings, ability to learn quickly, ability to adapt, flexibility, and computer literacy - both hardware and software.
10. How would your boss describe you and your work style?
"First, she'd say I have a lot of initiative - I see a big picture and do what has to be done to achieve results. Secondly, that I have business savvy - I know the business side as well as the technical side. And thirdly, I have a high work ethic - if I say I'm going to do something, I do it."
11. Why didn't you go further in school?
"At the time, earning a living was more important. But I'm thinking of furthering my education now."
12. What do you do in your spare time?
Say you keep up with current events and have been reading a best-selling business book (do it). Talk about any community activities you're involved in, but stress that those commitments won't interfere with work.
13. What interests you most about this position?
Stress the opportunity you'll have to grow, learn and acquire new skills.
14. What interests you least about this position?
Even if you hate filing, don't say so. Say, "I really don't see any major negatives. I can use the skills I already have and also learn new ones."
15. Why should we hire you?
This is a tough question and should be treated as if you were being asked about your strengths. Relate your strengths to the requirements of the job and pull it all together. Response to this should be that you think it is a job that you will be good at and give examples of skills, past experience, and accomplishments that will be useful for the position. Give examples of your network of contacts that you can bring to the company, talk about the heavy investment in your training and development that your past employers have made in you and that your new employer will get this relatively for no additional cost (emotional intelligence). You can say that you have already made some of your biggest mistakes and learned from them and now can bring the years of experience to your new employers and hit the floor running. You can say that you’re a source of “new blood” and can bring new ideas and alternative ways of looking at things and tackling problems to complement the team within the hiring company. If you are articulate, state that you can communicate at all levels of management. Add commitment, tenacity, computer literacy, and flexibility, to these other factors. Eg:"I love a challenge and I'm a fast learner. I have experience in this area, so I'll be able to start with some idea of what I'm doing. Everything I know about this company makes me feel we'd be a good match."
16. What experience have you had that qualifies you for this position?
"I have experience working with e-commerce companies on the consulting side. I've managed teams and have strong experience with HTML and ASP. My communication skills and business acumen are my strengths. I can wear many hats and believe I can bring added value to a team effort."
17. What attracted you to this job?
"I've been searching for a while now to find a company that had a business model and corporate philosophy like yours. I am interested in working for a company that provides products and services to the K-12 education market. My background is in this field, and my strength is in building relationships and solving problems. I am excited and interested in the idea of developing business relationships through e-commerce."
18. What are your salary expectations?
"I really need more information about the job before we start to discuss salary. I'd like to postpone that discussion until later. Could you tell me what is budgeted for the position?"
19. What qualities do you think are important to this position?
"To have a combination of technical and business knowledge and to be very results-oriented. My past record shows that I have those qualities and more. Because of my business acumen and technical know-how, the teams I have managed accomplished outstanding results, including booking more than $50 million in online revenue."
20. When have you been most motivated?
"My first job in a Software Eng. I had to undergo some rigorous training to understand the product and customer. At the same time, we were actually working with the customer. It required a lot of self-direction and motivation. I thrived on the whole experience - the discipline, the planning and the deadlines. It was a pressure cooker, but I got through it."
21. How long do you see yourself with us?
I see myself here as long as we both think that I am contributing to the vitality (life) of the company while still being grown through challenges.
22. Do you have any questions?
(This is usually asked by the interviewer at the end of the interview.). "Yes, I do. Who are your financial backers? Who are the key competitors? Does the company have a plan for the IPO? What would you say is the best thing about your product/service?"

Difference between Datagrid , Datalist, FormView

All these controls are ASP.NET data-bound controls

The DataGrid control renders a tabular, data-bound grid. This control allows you to define various types of columns to control the layout of the cell contents of the grid (bound columns, template columns) and add specific functionality (such as edit button columns, hyperlink columns, and so on). The control also supports a variety of options for paging through data.

FormView class provides a standard MMC Windows Forms view. It allows the result pane to be populated with a Windows Forms control.


The DataList control displays rows of database information in customizable format. The format in which the data is displayed is defined in item, alternating item, selected item, and edit item templates. Header, footer, and separator templates are also available to let you customize the overall appearance of the DataList. By including Button Web server controls in the templates, you can connect the list items to code that allows users to switch between display, selection, and editing modes.

PostFrom,
Mansoor Ali

Tuesday, April 8, 2008

The ASP.NET Page Life Cycle

When a page request is sent to the Web server, whether through a submission or location change, the page is run through a series of events during its creation and disposal. When we try to build ASP.NET pages and this execution cycle is not taken into account, we can cause a lot of headaches for ourselves. However, when used and manipulated correctly, a page's execution cycle can be an effective and powerful tool. Many developers are realizing that understanding what happens and when it happens is crucial to effectively writing ASP.NET pages or user controls. So let's examine in detail the ten events of an ASP.NET page, from creation to disposal. We will also see how to tap into these events to implant our own custom code.
I'll set the stage with a simple submission form written in ASP.NET with C#. The page is loaded for the first time and has several server-side Web controls on it. When the Web server receives a request for the page, it will process our Web controls and we will eventually get rendered HTML. The first step in processing our page is object initialization.

. Object Initialization
A page's controls (and the page itself) are first initialized in their raw form. By declaring your objects within the constructor of your C# code-behind file (see Figure 1), the page knows what types of objects and how many to create. Once you have declared your objects within your constructor, you may then access them from any sub class, method, event, or property. However, if any of your objects are controls specified within your ASPX file, at this point the controls have no attributes or properties. It is dangerous to access them through code, as there is no guarantee of what order the control instances will be created (if they are created at all). The initialization event can be overridden using the OnInit method.



Fig-1

2. Load Viewstate Data
After the Init event, controls can be referenced using their IDs only (no DOM is established yet for relative references). At LoadViewState event, the initialized controls receive their first properties: viewstate information that was persisted back to the server on the last submission. The page viewstate is managed by ASP.NET and is used to persist information over a page roundtrip to the server. Viewstate information is saved as a string of name/value pairs and contains information such as control text or value. The viewstate is held in the value property of a hidden < input > control that is passed from page request to page request. As you can see, this is a giant leap forward from the old ASP 3.0 techniques of maintaining state.
This event can be overridden using the LoadViewState method and is commonly used to customize the data received by the control at the time it is populated. Figure 2 shows an example of overriding and setting viewstate at the LoadViewState event.



Figure 2 - When LoadViewState is fired, controls are populated with the appropriate viewstate data.

3. LoadPostData Processes Postback Data
During this phase of the page creation, form data that was posted to the server (termed postback data in ASP.NET) is processed against each control that requires it.
When a page submits a form, the framework will implement the IPostBackDataHandler interface on each control that submitted data.
The page then fires the LoadPostData event and parses through the page to find each control that implements this interface and updates the control state with the correct postback data.
ASP.NET updates the correct control by matching the control's unique ID with the name/value pair in the NameValueCollection.
This is one reason that ASP.NET requires unique IDs for each control on any given page.
Extra steps are taken by the framework to ensure each ID is unique in situations, such as several custom user controls existing on a single page. After the LoadPostData event triggers, the RaisePostDataChanged event is free to execute (see below).
4. Object Load
Objects take true form during the Load event. All object are first arranged in the page DOM (called the Control Tree in ASP.NET) and can be referenced easily through code or relative position (crawling the DOM). Objects are then free to retrieve the client-side properties set in the HTML, such as width, value, or visibility. During Load, coded logic, such as arithmetic, setting control properties programmatically, and using the StringBuilder to assemble a string for output, is also executed. This stage is where the majority of work happens. The Load event can be overridden by calling OnLoad as shown in Figure 3.




Figure 3 - The OnLoad event is an ideal location to place logic.

5. Raise PostBack Change Events
As stated earlier, this occurs after all controls that implement the IPostBackDataHandler interface have been updated with the correct postback data.
During this operation, each control is flagged with a Boolean on whether its data was actually changed or remains the same since the previous submit.
ASP.NET then sweeps through the page looking for flags indicating that any object's data has been updated and fires RaisePostDataChanged.
The RaisePostDataChanged event does not fire until all controls are updated and after the Load event has occurred.
This ensures data in another control is not manually altered during the RaisePostDataChanged event before it is updated with postback data.


6. Process Client-Side PostBack Event
After the server-side events fire on data that was changed due to postback updates, the object which caused the postback is handled at the RaisePostBackEvent event.
The offending object is usually a control that posted the page back to the server due to a state change (with autopostback enabled) or a form submit button that was clicked.
There is often code that will execute in this event, as this is an ideal location to handle event-driven logic.
The RaisePostBackEvent event fires last in the series of postback events due to the accuracy of the data that is rendered to the browser.
Controls that are changed during postback should not be updated after the executing function is called due to the consistency factor.
That is, data that is changed by an anticipated event should always be reflected in the resulting page. The RaisePostBackEvent can be trapped by catching RaisePostBackEvent, as in Figure 4.




Figure 4 - The RaisePostDataChanged and RaisePostBackEvent events are defined by the IPostBackDataHandler interface.

7. Prerender the Objects
The point at which the objects are prerendered is the last time changes to the objects can be saved or persisted to viewstate.
This makes the PreRender step a good place to make final modifications, such as changing properties of controls or changing Control Tree structure, without having to worry about ASP.NET making changes to objects based off of database calls or viewstate updates.
After the PreRender phase those changes to objects are locked in and can no longer be saved to the page viewstate. The PreRender step can be overridden using OnPreRender

8. ViewState Saved
The viewstate is saved after all changes to the page objects have occurred. Object state data is persisted in the hidden < input > object and this is also where object state data is prepared to be rendered to HTML. At the SaveViewState event, values can be saved to the ViewState object, but changes to page controls are not. You can override this step by using SaveViewState, as shown Figure 5.



Figure 5 - Values are set for controls in OnPreRender. During the SaveViewState event, values are set for the ViewState object.

9. Render To HTML
The Render event commences the building of the page by assembling the HTML for output to the browser. During the Render event, the page calls on the objects to render themselves into HTML. The page then collects the HTML for delivery. When the Render event is overridden, the developer can write custom HTML to the browser that nullifies all the HTML the page has created thus far. The Render method takes an HtmlTextWriter object as a parameter and uses that to output HTML to be streamed to the browser. Changes can still be made at this point, but they are reflected to the client only. The Render event can be overridden, as shown in Figure 6 (below).
10. Disposal
After the page's HTML is rendered, the objects are disposed of. During the Dispose event, you should destroy any objects or references you have created in building the page. At this point, all processing has occurred and it is safe to dispose of any remaining objects, including the Page object. You can override Dispose, as shown in Figure 6.



Figure 6 - The Render event will output custom HTML to the browser through the HtmlTextWriter object.

Conclusion
Each time we request an ASP.NET page, we run through the same process from initialization to disposal. By understanding the inner workings of the ASP.NET page process, writing and debugging our code will be much easier and effective (not to mention less frustrating).

Wednesday, April 2, 2008

Getting Table Name from all the Procedures of any database

In Sql Server 2000 or later versions,

Suppose you have deleted one of the column of any table and now you have to change all your procedures where this column is used.

Easy way for this problem is the


Select * from information_Schema.Routines where Routine_Definition like '%table1%'


This Query will allow to find out whether table name specified in where condition exists in which Procedures.

INFORMATION_SCHEMA.ROUTINES view is used to retrieve information about stored procedures. This view contains one row for each stored procedure accessible to the current user in the current database.

The INFORMATION_SCHEMA.ROUTINES view was introduced in SQL Server 2000. This view is based on the sysobjects, syscomments and other system tables.

How to display your own logo in the address bar?

If you need to put your website logo in the top address bar instead of browser's logo then follow these steps.
1. Add a file called "favicon.ico" (an icon file of your website logo) to your website root directory with 16*16 or 32*32 dimensions.
2.Insert the following HTML tag inside the head section of your web page in the link tag as
rel="shortcut icon" href="favicon.ico"


**If you are working with master pages then put this code in head section of master page otherwise you have to put this code in every page.

For more information check out this link.

http://www.chami.com/tips/internet/110599I.html