Pages

Ads 468x60px

For New Update Use this Link http://dotnethubs.blogspot.in/ Offer for you

.

Saturday 9 March 2013

ASP.NET Controls with example

ASP.NET Controls with example
There are three kinds of server controls:
  • HTML Server Controls - Traditional HTML tags
  • Web Server Controls - New ASP.NET tags
  • Validation Server Controls - For input validation  

ASP.NET - HTML Server Controls

HTML elements in ASP.NET files are, by default, treated as text. To make these elements programmable, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control. The id attribute is added to identify the server control. The id reference can be used to manipulate the server control at run time. All HTML server controls must be within a <form> tag with the runat="server" attribute. The runat="server" attribute indicates that the form should be processed on the server. It also indicates that the enclosed controls can be accessed by server scripts.
Ex1.aspx:
<html>
<body>
<form runat="server">
<a href=”www.google.com “ id="link1" runat="server">google</a>
</form>
</body>
</html>

 ASP.NET - Web Server Controls

Like HTML server controls, Web server controls are also created on the server and they require a runat="server" attribute to work. However, Web server controls do not necessarily map to any existing HTML elements and they may represent more complex elements.
The syntax for creating a Web server control is:
<asp:control_name id="some_id" runat="server" />
In the following example we declare a Button server control in an .aspx file. Then we create an event handler for the Click event which changes the text on the button:

<html>
<body>
<form runat="server">
<asp:Button id="button1" Text="Click me!"runat="server" OnClick="submit"/>
</form>
</body>
</html>
 protected void btnsend_Click(object sender, EventArgs e)
{
button1.Text="You clicked me!"
}
Ad rotator:
<script  runat="server">
   Sub change_url(sender As Object, e As AdCreatedEventArgs) 
     e.NavigateUrl="http://http://dotnetnukes.blogspot.in/" 
   End Sub 
</script>


<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:AdRotator AdvertisementFile="Ad1.xml"
runat="server" OnAdCreated="change_url"
target="_blank" />
</form>
<p><a href="ad1.xml" target="_blank">View XML file</a></p>
</body>
</html>

Button:
Ex:
<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit" />
</form>
</body>
</html>
 button1.Text="You clicked me!";
Ex:
<!DOCTYPE html>
<html>
<body>

<form runat="server">
<asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit" />
</form>
</body>
</html>
 protected void submit_Click(object sender, EventArgs e)
{
  
button1.Style("background-color")="#0000ff";
   button1.Style("color")="#ffffff";
   button1.Style("width")="200px";
   button1.Style("cursor")="pointer";
   button1.Style("font-family")="verdana";
   button1.Style("font-weight")="bold";
   button1.Style("font-size")="14pt";
   button1.Text="You clicked me!";
}

Calendar:
<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:Calendar runat="server" id=”cal1” />
</form>
</body>
</html>
Ex2:
<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:Calendar DayNameFormat="Full" runat="server">
   <WeekendDayStyle BackColor="#fafad2" ForeColor="#ff0000" />
   <DayHeaderStyle ForeColor="#0000ff" />
   <TodayDayStyle BackColor="#00ff00" />
</asp:Calendar>
</form>
</body>
</html>
Checkbox:
<!DOCTYPE html>
<html>
<body>
<form runat="server">
<p>prement add:
<asp:TextBox id=" prement " runat="server" />
<br>
present add:
<asp:TextBox id=" present " runat="server" />
<asp:CheckBox id="check1"Text="Same add" TextAlign="Right"
AutoPostBack="True" OnCheckedChanged="Check"runat="server" />
</p>
</form>
</body>
</html>
 protected void  Page_Load (object sender, EventArgs e)
{
     if( check1.Checked)
     {
       work.Text=home.Text;
     else
       work.Text="";
     }
}

Output:
prement add:  
present add:     Same add.
Checkboxlist:

<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:CheckBoxList id="check1" AutoPostBack="True"TextAlign="Right" OnSelectedIndexChanged="Check"runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:CheckBoxList>
<br>
<asp:label id="message" runat="server"/>
</form>
</body>
</html>
 protected void  Page_Load (object sender, EventArgs e)
{
   mess.Text="<p>Selected Item(s):</p>";

   for(int  i=0 ;i< check1.Items.Count;i++)
{
     if( check1.Items(i).Selected)
     {
       mess.Text+=check1.Items(i).Text + "<br>";
      }    
  }
}

Output:
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Selected Items:
Item 1
Item 2
Item 3
Item 5
Item 6

Dropdownlist:

<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:DropDownList id="drop1" runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:DropDownList>
<p><asp:label id="mess" runat="server"/></p>
</form>
</body>
</html>
 protected void  Page_Load (object sender, EventArgs e)
{
     mess.Text="You selected " + drop1.SelectedItem.Text;
  }   
    Out put:
     
You selected Item 3
Hyper link:

<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:HyperLink NavigateUrl=”
http://www.google.com”Text="Visit google!"
Target="_blank"runat="server" />
</form>
</body>
</html>


Image:
<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:Image runat="server"Alternate Text="W3Schools" ImageUrl="/folder/filename.jpg"/>
</form>
</body>
</html>

Imagebutton:

<!DOCTYPE html>
<html>
<body>
<form runat="server">
<p>Click on the image:</p>
<asp:ImageButton runat="server" ImageUrl="smiley.gif" id=”imgbtn”
OnClick="getCoordinates"/>
<p><asp:label id="mess" runat="server"/></p>
</form>
</body>
</html>
<script  runat="server">
Sub getCoordinates(sender As Object, e As ImageClickEventArgs) 
   mess.Text="Coordinates: " & e.x & ", " & e.y
End Sub
</script>

Label:

<!DOCTYPE html>
<html>
<body>

<form runat="server">
Write some text:
<asp:TextBox id="txt1" Width="200" runat="server" />
<asp:Button id="b1" Text="Copy to Label" OnClick="submit" runat="server" />
<p><asp:Label id="label1" runat="server" /></p>
</form>
</body>
</html>
Protected void btnclick_Click(object sander,eventArgs e)
{
Label1.text=txt1.text;
}

Linkbutton:

<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:LinkButton Text="Click me!" OnClick="lblClick" runat="server" />
<p><asp:Label id="Label1" runat="server" /></p>
</form>
</body>
</html>
Protected void btnclick_Click(object sander,eventArgs e)
{
   Label1.Text="You clicked the LinkButton control";
}


Radiobutton:


<!DOCTYPE html>
<html>
<body>
<form runat="server">
Select your favorite color:
<br>
<asp:RadioButton id="red" Text="Red" Checked="True" GroupName="colors" runat="server"/>
<br>
<asp:RadioButton id="green" Text="Green" GroupName="colors" runat="server"/>
<br>
<asp:RadioButton id="blue" Text="Blue" GroupName="colors" runat="server"/>
<br>
<asp:Button text="Submit" OnClick="submit" runat="server"/>
<p><asp:Label id="Label1" runat="server"/></p>
</form>
</body>
</html>

Protected void submit_Click(object sander,eventArgs e)

{

if (red.Checked)

{
   Label1.Text="You selected " & red.Text;

}
elseIf (green.Checked )

{
   Label1.Text="You selected " & green.Text;

}

elseIf( blue.Checked)
{
   Label1.Text="You selected " & blue.Text;
}

}


Select your favorite color:
Red
Green
Blue
You selected Blue

Repeater:
<%@ Import Namespace="System.Data" %>

<script  runat="server">
sub Page_Load
if Not Page.IsPostBack then
   dim mycdcatalog=New DataSet
   mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
   cdcatalog.DataSource=mycdcatalog
   cdcatalog.DataBind()
end if
end sub
</script>

<!DOCTYPE html>
<html>
<body>

<form runat="server">
<asp:Repeater id="cdcatalog" runat="server">

<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Title</th>
<th>Artist</th>
<th>Company</th>
<th>Price</th>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr>
<td>
<%#Container.DataItem("title")%> </td>
<td>
<%#Container.DataItem("artist")%> </td>
<td>
<%#Container.DataItem("company")%> </td>
<td>
<%#Container.DataItem("price")%> </td>
</tr>
</ItemTemplate>

<FooterTemplate>
</table>
</FooterTemplate>

</asp:Repeater>
</form>

</html>
</body>
Title
Artist
Company
Price
Empire Burlesque 
Bob Dylan 
Columbia 
10.90 
Hide your heart 
Bonnie Tyler 
CBS Records 
9.90 
Greatest Hits 
Dolly Parton 
RCA 
9.90 
Still got the blues 
Gary Moore 
Virgin records 
10.20 
Eros 
Eros Ramazzotti 
BMG 
9.90 

text box:
<!DOCTYPE html>
<html>
<body>

<form runat="server">
Enter your name:
<asp:TextBox id="txt1" runat="server" />
<asp:Button OnClick="submit" Text="Submit" runat="server" />
<p><asp:Label id="lbl1" runat="server" /></p>
</form>

</body>
</html>
Protected void submit_click(object sender,eventArgs e)
{
Lbl1.text=txt1.text;
}
Enter your name:  


Friday 8 March 2013

Validation controls using asp.net


Validation controls using asp.net
1.RequiredFieldValidation Control 
 2.RangeValidator Control 
 3.RegularExpressionValidator Control 
 4.CompareValidator Control 
 5.CustomValidator Control 
 6. Validation Summery
  
 Properties of Validation Controls:  
 ControlToValidate - Id of control Which you want to validate. 
 ErrorMessage - Message that will be displayed in the validation summary. 
 IsValid - Whether or not the control is valid. 
 Validate - Method to validate the input control and update the IsValid property. 
 Display - How the error message will display.options are given below 
 None:Message is never displayed. 
 Static:Validation message will display in the page layout. 
 Dynamic:Validation message is dynamically added to the page if validation fails. 
  
 Example with code: 
  
 1.RequiredFieldValidation:It is simple validation control which checks data is entered or not. 
 <asp:textbox id="txtEmpName" runat="server"/> 
 <asp:RequiredFieldValidator id="refid" runat="server" ControlToValidate="txtEmpName" 
 ErrorMessage="* Please enter the employee name" Display="dynamic">* 
 </asp:RequiredFieldValidator> 
  
 2.RangeValidator:It checks to see if a control value is within a valid range or not. 
 <asp:textbox id="txtDOB" runat="server"/> 
 <asp:RangeValidator id="rangeVal" runat="server" 
 ControlToValidate="txtDOB1" 
 MaximumValue="12/06/2009" 
 MinimumValue="01/01/1983" 
 Type="Date" 
 ErrorMessage="* Please enter the valid date" Display="static">*</asp:RangeValidator> 
  
 3.RegularExpressionValidator:It can be used for email validation or any specified string based on pattern matching. 
 E-mail: <asp:textbox id="txtEmail" runat="server"/> 
 <asp:RegularExpressionValidator id="revemail" runat="server" 
 ControlToValidate="txtEmail" 
 ValidationExpression=".*@.*\..*" 
 ErrorMessage="* Please enter valid e-mail ." 
 display="dynamic">* 
 </asp:RegularExpressionValidator> 
  
 4.CompareValidator: It allows you to make comparisons between two form controls and also compare values contained with 
 these controls to constants that specified by userd. 
  
 New Password: <asp:textbox id="txtNewPass" runat="server"/><br /> 
 Confirm Passowrd: <asp:textbox id="txtConfirmPass" runat="server"/><br /> 
 <asp:CompareValidator id="valCompare" runat="server" 
 ControlToValidate="txtNewPass" ControlToCompare="txtConfirmPass" 
 Operator="Equals" 
 ErrorMessage="* New Password and confirm password are not same" 
 Display="dynamic">* 
 </asp:CompareValidator> 
  
 5.CustomValidator:It allows you to write your own server-side or client-side validations logic and it can be easily applied to your web forms controls. 
 <asp:CustomValidator ID="cv" runat="server"  
 ControlToValidate="txtName" ClientValidationFunction="customvalidationr"  
 ErrorMessage="Please enter correct name"></asp:CustomValidator> 
 <asp:TextBox ID="txtName" runat="server"></asp:TextBox> 
 <asp:Button ID="btnSubmit" runat="server" /> 

 5.CustomValidator:
The ValidationSummary control is used to display a summary of all validation errors occurred in a Web page.
The error message displayed in this control is specified by the ErrorMessage property of each validation control. If the ErrorMessage property of the validation control is not set, no error message is displayed for that validation control.

Example
<form runat="server">
<table>
<tr>
<td>
<table bgcolor="#b0c4de" cellspacing="10">
   <tr>
     <td align="right">Name:</td>
     <td><asp:TextBox id="txt_name" runat="server"/></td>
     <td>
     <asp:RequiredFieldValidator
     ControlToValidate="txt_name"
     ErrorMessage="Name"
     Text="*"
     runat="server"/>
     </td>
   </tr>
   <tr>
     <td align="right">Card Type:</td>
     <td>
     <asp:RadioButtonList id="rlist_type"
     RepeatLayout="Flow"
     runat="server">
     <asp:ListItem>Diners</asp:ListItem>
     <asp:ListItem>MasterCard</asp:ListItem>
     <asp:ListItem>Visa</asp:ListItem>
     </asp:RadioButtonList>
     </td>
     <td>
     <asp:RequiredFieldValidator
     ControlToValidate="rlist_type"
     ErrorMessage="Card Type"
     InitialValue=""
     Text="*"
     runat="server"/>
     </td>
   </tr>
   <tr>
     <td></td>
     <td><asp:Button id="b1" Text="Submit" runat="server"/></td>
     <td></td>
   </tr>
</table>
</td>
</tr>
</table>
<br>
<asp:ValidationSummary
HeaderText="You must enter a value in the following fields:"
DisplayMode="BulletList"
EnableClientScript="true"
runat="server"/>
</form>


DEMO

how to import Contacts from GMAIL using ASP.NET and C#

how to import Contacts from GMAIL using ASP.NET and C#
Introduction:

In this article I will explain how to import gmail contacts of a user by using GContacts Data API provided by Google.
Description:
We have developed one social network site at that time we think that how to popularize the our social network site I have checked some of social network sites at that time we got idea to implement import contacts concept is best to intimate all of our friends at a time I have searched so many websites to implement this concepts but no result finally I have implemented import contacts from gmail 

I used ASP.NET and C# for developing this application.
We need to follow below steps to get gmail contacts 

Step-1:  Download Google data API setup from the specified URL 

Or you can directly download with the following

That Set Up will installs set of Google Data dll’s (Google.GData.Apps.dll, Google.GData.Client.dll, Google.GData.Contacts.dll, Google.GData.Extensions.dll) into client installed Machine, you should collect that dll’s for your program.

Step-2:  Design our aspx page (Default.aspx) by using with the following UI as simple scenario.


Step-2:  Design our aspx page (Default.aspx) by using with the following UI as simple scenario.


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>IMport Gmail Contacts</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
UserName</td>
<td>
<asp:TextBox ID="txtgmailusername" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Password</td>
<td>
<asp:TextBox ID="txtpassword" runat="server" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</td>
</tr>
</table>
</div>
<div>
<asp:GridView ID="gvmails" runat="server"></asp:GridView>
</div>
</form>
</body>
</html>
Step-3:  Add those downloaded google dll’s as reference to your website in visual studio->Solution Explorer ->Right Click-> Click on Add Reference….->Browse ->Get dll’s from Installed Location->Press OK.

Step-4:

A) Add namespace these namespace to your code behind


using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;
using Google.Contacts;

B) After that write following code in code behind


public static DataSet GetGmailContacts(string App_Name, string Uname, string UPassword)
{
DataSet ds = new DataSet();
DataTable dt = new DataTable();
DataColumn C2 = new DataColumn();
C2.DataType = Type.GetType("System.String");
C2.ColumnName = "EmailID";
dt.Columns.Add(C2);
RequestSettings rs = new RequestSettings(App_Name, Uname, UPassword);
rs.AutoPaging = true;
ContactsRequest cr = new ContactsRequest(rs);
Feed<Contact> f = cr.GetContacts();
foreach (Contact t in f.Entries)
{
foreach (EMail email in t.Emails)
{
DataRow dr1 = dt.NewRow();
dr1["EmailID"] = email.Address.ToString();
dt.Rows.Add(dr1);
}
}
ds.Tables.Add(dt);
return ds;
}
protected void Button1_Click(object sender, EventArgs e)
{
DataSet ds = GetGmailContacts("MyNetwork Web Application!", txtgmailusername.Text, txtpassword.Text);
gvmails.DataSource = ds;
gvmails.DataBind();
}
Demo

Note:Keep Remember You Need Internet Connection @ the Time of Executing This Application.
I hope it helps you 

Download sample code attached

Thursday 7 March 2013

Latest Walk-in Interview

Dear Candidate,
There is an opportunity for PHP Professionals for growth at Deloitte - And as your goals and aspirations evolve and change, Deloitte’s breadth of offerings will offer you the ability to define your career progression.
Education: Any Graduate with IT experience
Position Offered: Oracle Consultant
Job Field:  IT/ Software Services
Experience: 2-4 Years
Salary Offered: Best in the Industry
Deloitte is the largest professional services network in the world by revenue and has 193,000 employees in more than 150 countries providing audit, tax, consulting, enterprise risk and financial advisory services. In FY 2012, Deloitte earned a record $34 billion USD in revenues.
To ApplyCLICK HERE
If you are unable to open the above link then click here on www.thejobportal.in/aboutdeloittephp.php                 

Wednesday 6 March 2013

interview-questions-and-answers

Common Interview Questions and Answers
1. Tell me about yourself:
The most often asked question in interviews. You need to have a short statement prepared in your mind. Be careful that it does not sound rehearsed. Limit it to work-related items unless instructed otherwise. Talk about things you have done and jobs you have held that relate to the position you are interviewing for. Start with the item farthest back and work up to the present.
2. Why did you leave your last job?
Stay positive regardless of the circumstances. Never refer to a major problem with management and never speak ill of supervisors, co- workers or the organization. If you do, you will be the one looking bad. Keep smiling and talk about leaving for a positive reason such as an opportunity, a chance to do something special or other forward- looking reasons.
3. What experience do you have in this field? Speak about specifics that relate to the position you are applying for. If you do not have specific experience, get as close as you can.
4. Do you consider yourself successful?
You should always answer yes and briefly explain why. A good explanation is that you have set goals, and you have met some and are on track to achieve the others.
5. What do co-workers say about you?
Be prepared with a quote or two from co-workers. Either a specific statement or a paraphrase will work. Jill Clark, a co-worker at Smith Company, always said I was the hardest workers she had ever known. It is as powerful as Jill having said it at the interview herself.
6. What do you know about this organization?
This question is one reason to do some research on the organization before the interview. Find out where they have been and where they are going. What are the current issues and who are the major players?
7. What have you done to improve your knowledge in the last year?
Try to include improvement activities that relate to the job. A wide variety of activities can be mentioned as positive self-improvement. Have some good ones handy to mention.
8. Are you applying for other jobs?
Be honest but do not spend a lot of time in this area. Keep the focus on this job and what you can do for this organization. Anything else is a distraction.
9. Why do you want to work for this organization?
This may take some thought and certainly, should be based on the research you have done on the organization. Sincerity is extremely important here and will easily be sensed. Relate it to your long-term career goals.
10. Do you know anyone who works for us?
Be aware of the policy on relatives working for the organization. This can affect your answer even though they asked about friends not relatives. Be careful to mention a friend only if they are well thought of.
11. What kind of salary do you need?
A loaded question. A nasty little game that you will probably lose if you answer first. So, do not answer it. Instead, say something like, That's a tough question. Can you tell me the range for this position? In most cases, the interviewer, taken off guard, will tell you. If not, say that it can depend on the details of the job. Then give a wide range.
12. Are you a team player?
You are, of course, a team player. Be sure to have examples ready. Specifics that show you often perform for the good of the team rather than for yourself are good evidence of your team attitude. Do not brag, just say it in a matter-of-fact tone. This is a key point.
13. How long would you expect to work for us if hired?
Specifics here are not good. Something like this should work: I'd like it to be a long time. Or As long as we both feel I'm doing a good job.
14. Have you ever had to fire anyone? How did you feel about that?
This is serious. Do not make light of it or in any way seem like you like to fire people. At the same time, you will do it when it is the right thing to do. When it comes to the organization versus the individual who has created a harmful situation, you will protect the organization. Remember firing is not the same as layoff or reduction in force.
15. What is your philosophy towards work?
The interviewer is not looking for a long or flowery dissertation here. Do you have strong feelings that the job gets done? Yes. That's the type of answer that works best here. Short and positive, showing a benefit to the organization.
16. If you had enough money to retire right now, would you?
Answer yes if you would. But since you need to work, this is the type of work you prefer. Do not say yes if you do not mean it.
17. Have you ever been asked to leave a position?
If you have not, say no. If you have, be honest, brief and avoid saying negative things about the people or organization involved.< br /> 18. Explain how you would be an asset to this organization.
You should be anxious for this question. It gives you a chance to highlight your best points as they relate to the position being discussed. Give a little advance thought to this relationship.
19. Why should we hire you?
Point out how your assets meet what the organization needs. Do not mention any other candidates to make a comparison.
20. Tell me about a suggestion you have made.
Have a good one ready. Be sure and use a suggestion that was accepted and was then considered successful. One related to the type of work applied for is a real plus.
21. What irritates you about co-workers?
This is a trap question. Think real hard but fail to come up with anything that irritates you. A short statement that you seem to get along with folks is great.
22. What is your greatest strength?
Numerous answers are good, just stay positive. A few good examples: Your ability to prioritize, Your problem-solving skills, Your ability to work under pressure, Your ability to focus on projects, Your professional expertise, Your leadership skills, Your positive attitude
23. Tell me about your dream job.
Stay away from a specific job. You cannot win. If you say the job you are contending for is it, you strain credibility. If you say another job is it, you plant the suspicion that you will be dissatisfied with this position if hired. The best is to stay genetic and say something like: A job where I love the work, like the people, can contribute and can't wait to get to work.
24. Why do you think you would do well at this job?
Give several reasons and include skills, experience and interest.
25. What are you looking for in a job?
Stay away from a specific job. You cannot win. If you say the job you are contending for is it, you strain credibility. If you say another job is it, you plant the suspicion that you will be dissatisfied with this position if hired. The best is to stay genetic and say something like: A job where I love the work, like the people, can contribute and can't wait to get to work.
26. What kind of person would you refuse to work with?
Do not be trivial. It would take disloyalty to the organization, violence or lawbreaking to get you to object. Minor objections will label you as a whiner.
27. What is more important to you: the money or the work?
Money is always important, but the work is the most important. There is no better answer.
28. What would your previous supervisor say your strongest point is?
There are numerous good possibilities: Loyalty, Energy, Positive attitude, Leadership, Team player, Expertise, Initiative, Patience, Hard work, Creativity, Problem solver
29. Tell me about a problem you had with a supervisor.
Biggest trap of all. This is a test to see if you will speak ill of your boss. If you fall for it and tell about a problem with a former boss, you may well below the interview right there. Stay positive and develop a poor memory about any trouble with a supervisor.
30. What has disappointed you about a job?
Don't get trivial or negative. Safe areas are few but can include: Not enough of a challenge. You were laid off in a reduction Company did not win a contract, which would have given you more responsibility.
31. Tell me about your ability to work under pressure.
You may say that you thrive under certain types of pressure. Give an example that relates to the type of position applied for.
32. Do your skills match this job or another job more closely?
Probably this one. Do not give fuel to the suspicion that you may want another job more than this one.
33. What motivates you to do your best on the job?
This is a personal trait that only you can say, but good examples are: Challenge, Achievement, Recognition
34. Are you willing to work overtime? Nights? Weekends?
This is up to you. Be totally honest.
35. How would you know you were successful on this job?
Several ways are good measures:
You set high standards for yourself and meet them. Your outcomes are a success.Your boss tell you that you are successful
36. Would you be willing to relocate if required?
You should be clear on this with your family prior to the interview if you think there is a chance it may come up. Do not say yes just to get the job if the real answer is no. This can create a lot of problems later on in your career. Be honest at this point and save yourself uture grief.
37. Are you willing to put the interests of the organization ahead of your own?
This is a straight loyalty and dedication question. Do not worry about the deep ethical and philosophical implications. Just say yes.
38. Describe your management style.
Try to avoid labels. Some of the more common labels, like progressive, salesman or consensus, can have several meanings or descriptions depending on which management expert you listen to. The situational style is safe, because it says you will manage according to the situation, instead of one size fits all.
39. What have you learned from mistakes on the job?
Here you have to come up with something or you strain credibility. Make it small, well intentioned mistake with a positive lesson learned. An example would be working too far ahead of colleagues on a project and thus throwing coordination off.
40. Do you have any blind spots?
Trick question. If you know about blind spots, they are no longer blind spots. Do not reveal any personal areas of concern here. Let them do their own discovery on your bad points. Do not hand it to them.
41. If you were hiring a person for this job, what would you look for?
Be careful to mention traits that are needed and that you have.
42. Do you think you are overqualified for this position?
Regardless of your qualifications, state that you are very well qualified for the position.
43. How do you propose to compensate for your lack of experience?
First, if you have experience that the interviewer does not know about, bring that up: Then, point out (if true) that you are a hard working quick learner.
44. What qualities do you look for in a boss?
Be generic and positive. Safe qualities are knowledgeable, a sense of humor, fair, loyal to subordinates and holder of high standards. All bosses think they have these traits.
45. Tell me about a time when you helped resolve a dispute between others.
Pick a specific incident. Concentrate on your problem solving technique and not the dispute you settled.
46. What position do you prefer on a team working on a project?
Be honest. If you are comfortable in different roles, point that out.
47. Describe your work ethic.
Emphasize benefits to the organization. Things like, determination to get the job done and work hard but enjoy your work are good.
48. What has been your biggest professional disappointment?
Be sure that you refer to something that was beyond your control. Show acceptance and no negative feelings.
49. Tell me about the most fun you have had on the job.
Talk about having fun by accomplishing something for the organization.
50. Do you have any questions for me?
Always have some questions prepared. Questions prepared where you will be an asset to the organization are good. How soon will I be able to be productive? and What type of projects will I be able to assist on? are examples.
50. What's your current salary?
Questions about your current compensation may sound personal, but they can still be asked at interviews. Never lie or stretch the truth, as if you are found out it could jeopardize your entire application.
Answers:
My present employer pays me well outside of the norm, however I would not like to limit my job prospects by using that salary as a comparison.
As a highly valued member of the company, I am paid on the very high end of current market rates.
51 .What do you enjoy about the industry you are in?
This can be a tough question that will put you on the spot. When responding be polite, diplomatic and give a good business related answer.
Answers:
I can't really give you a accurate answer because at this time I don't know the scope of the job, it’s responsibilities, hours, etc.
The job I perform, the salary I receive and the circumstances at my current company are not really comparable to the opportunity we are discussing today. However when I consider my skill sets, academic qualifications and work experience, I am confident that a salary between £25,000 - £33,000 would be appropriate.

Monday 4 March 2013

placement-papers

3i Infotech Placement Papers - 3i Infotech Placement Papers - Aptitude Questions (ID-4376)

PLACEMENT PAPER

Aptitude Questions
In a class composed of x girls and y boys what part of the class is composed of girls
A. y/(x + y)
B. x/xy
C. x/(x + y)
D. y/xy
(Ans.C)
What is the maximum number of half-pint bottles of cream that can be filled with a 4-gallon can of cream(2 pt.=1 qt. and 4 qt.=1 gal) A. 16
B. 24
C. 30
D. 64
(Ans.D)
If the operation,^ is defined by the equation x ^ y = 2x + y,what is the value of a in 2 ^ a = a ^ 3
A.0
B.1
C.-1
D.4
(Ans.B)
A coffee shop blends 2 kinds of coffee,putting in 2 parts of a 33p. a gm. grade to 1 part of a 24p. a gm.If the mixture is changed to 1 part of the 33p. a gm. to 2 parts of the less expensive grade,how much will the shop save in blending 100 gms.
A.Rs.90
B.Rs.1.00
C.Rs.3.00
D.Rs.8.00
(Ans.C) There are 200 questions on a 3 hr examination.Among these questions are 50 mathematics problems.It is suggested that twice as much time be spent on each maths problem as for each other question.How many minutes should be spent on mathematics problems
A.36
B.72
C.60
D.100
(Ans.B)
In a group of 15,7 have studied Latin, 8 have studied Greek, and 3 have not studied either.How many of these studied both Latin and Greek A.0
B.3
C.4
D.5
(Ans.B)
If 13 = 13w/(1-w) ,then (2w)2 =
A.1/4
B.1/2
C.1
D.2
(Ans.C)
If a and b are positive integers and (a-b)/3.5 = 4/7, then
(A) b < a (B) b > a
(C) b = a
(D) b>= a
(Ans. A)
In june a baseball team that played 60 games had won 30% of its game played. After a phenomenal winning streak this team raised its average to 50% .How many games must the team have won in a row to attain this average?
A. 12
B. 20
C. 24
D. 30
(Ans. C)
M men agree to purchase a gift for Rs. D. If three men drop out how much more will each have to contribute towards the purchase of the gift/
A. D/(M-3)
B. MD/3
C. M/(D-3)
D. 3D/(M2-3M)
(Ans. D)
A company contracts to paint 3 houses. Mr.Brown can paint a house in 6 days while Mr.Black would take 8 days and Mr.Blue 12 days. After 8 days Mr.Brown goes on vacation and Mr. Black begins to work for a period of 6 days. How many days will it take Mr.Blue to complete the contract?
A. 7
B. 8
C. 11
D. 12
(Ans.C)
2 hours after a freight train leaves Delhi a passenger train leaves the same station travelling in the same direction at an average speed of 16 km/hr. After travelling 4 hrs the passenger train overtakes the freight train. The average speed of the freight train was?

A. 30
B. 40
C.58
D. 60
(Ans. B)
If 9x-3y=12 and 3x-5y=7 then 6x-2y = ? A.-5
B. 4
C. 2
D. 8
(Ans. D)

Saturday 2 March 2013

java-interview-questions-and-answers

Core Java - Interview Questions and Answers

1)What is difference between JDK,JRE and JVM?

JVM->
JVM is an acronym for Java Virtual Machine, it is an abstract machine which provides the runtime environment in which java bytecode can be executed.JVMs are available for many hardware and software platforms (so JVM is plateform dependent).
JRE->
JRE stands for Java Runtime Environment. It is the implementation of JVM and physically exists.
JDK->
JDK is an acronym for Java Development Kit. It physically exists. It contains JRE + development tools.

How many types of memory areas are allocated by JVM?

Many types:
1. Class(Method) Area
2.Heap
3.Program Counter Register
4.Native Method Stack
5.Stack

What is JIT compiler?

Just-In-Time(JIT) compiler:It is used to improve the performance. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation.Here the term “compiler” refers to a translator from the instruction set of a Java virtual machine (JVM) to the instruction set of a specific CPU.

What is platform?

A platform is basically the hardware or software environment in which a program runs. There are two types of platforms software-based and hardware-based. Java provides software-based platform.

What is the main difference between Java platform and other platforms?

The Java platform differs from most other platforms in the sense that it's a software-based platform that runs on top of other hardware-based platforms.It has two components: 1.Runtime Environment
1.API(Application Programming Interface)

What gives Java its 'write once and run anywhere' nature?

The bytecode. Java is compiled to be a byte code which is the intermediate language between source code and machine code. This byte code is not platorm specific and hence can be fed to any platform.

What is classloader?

The classloader is a subsystem of JVM that is used to load classes and interfaces.There are many types of classloaders e.g. Bootstrap classloader, Extension classloader, System classloader, Plugin classloader etc.

Is Empty .java file name a valid source file name?

Yes, save your java file by .java only, compile it by javac .java and run by java yourclassname Let's take a simple example:
class A{
public static void
main(String args[]){
System.out.println("Hello java");
}
}
/compile by javac .java
//run by java A
compile it by javac .java
run it by java A
 

..




New Updates

Related Posts Plugin for WordPress, Blogger...

Related Result