Thursday, September 27, 2012

Disallow space using regular expression validator in asp.net

Here is the full HTML code:



Remove HTML tags from string in C#

Below is the sample code. The string contains HTML tags like below:


HTML Code:


.CS Code
protected void btnTest_Click(object sender, EventArgs e)
{
string strHtml = "
Hello World

Br Should not come.But what about this? Will this | will come? ) ";

Regex regex = new Regex("<[^>]*>");

string strWithOutHTMLTag = regex.Replace(strHtml, "");

lblResult.Text = strWithOutHTMLTag;
}

The output will come as:
"Hello World Br Should not come.But what about this? Will this | will come? )"

Interview Tips

Purpose of Telephonic Interview: Telephonic Interview is a tool for the employers to narrow down the pool of applicants who will be invited for Face to Face interview. It is also used to cut down their cost for outstation candidates. It is an effective method to measure candidate’s communication and listening skills. Remember your voice can tell many things about you.

Way to success for Telephonic Interviews
  • Prepare the way as you are giving your regular interview where you need to compile your strength and weaknesses.
  • Go to the washroom before the interview incase the interview last longer then expected.
  • Keep your resume in front of you as the interviewer will start questions first related to what you have done and currently doing.
  • Keep plain paper and pencil/pen handy to take notes of important discussions. Also have a glass of water handy to wet your throat.
  • If you are using your hand set make sure it is appropriately charged and in full network range.
  • Make sure the surrounding is quite and does contain Noise Pollution.
  • Be prepared to give a 2 to 3 minutes positive summary of your professional career.
  • Read your resume thoroughly to explain your professional or project experience.
  • Be enthusiastic. Speak confidently, slowly and clearly.
  • Be Sincere, if you do not understand the question ask the interviewer to repeat the question.
  • Make sure you do not have any other appointment close to the interview, incase the interviewer need more time.
  • Value the interview time to convey that you value and respect the interview appointment.
  • Turn off call waiting on your phone.
  • Keep your body and mind calm.
  • Try to give short answers.
  • Keep on smiling during the interview as it will project a positive image to the listener and change the tone of your voice.
  • If you are not in a position to take the interview at the given time, Apologies to the interviewer and ask for a reschedule.
  • Don’t interrupt the interviewer. Listening skills is a crucial component during the interview process.
  • If you do not know the answer of any question, be frank and admit it and offer the interviewer that you will do more research on the subject for the answer. Do not try to prove that your answer is right or lie to the interviewer. Trying to cover up will only make things worse.
  • Take all the details of the Job from the interviewer like Client location, Project Details, etc.
  • At the end of the interview ask the interviewers on where does you stand and what would be the next step. Remember to say ‘Thank You’ for the time given.

Appropriate Interview Behavior
  • Plan to reach the interview venue at least 30 minutes before the scheduled interview.
  • Try to relax. Be yourself.
  • Have a firm Handshake at the start of the interview.
  • Show self-confidence.
  • Maintain good eye contact with the interviewer.
  • Smile.
  • Remember to listen to the question and answer only that question.
  • Think before answering questions. Try to make your answers as clear as possible.
  • Answer questions in a clear and confident voice.
  • Avoid negative body language – crossing your arms, slouching, covering your mouth, fidgeting while speaking.
  • Try not to interrupt the interviewer when he/she is talking.
  • Read the interviewer’s mood. If the interviewer is formal, then you should be formal. If the interviewer is casual, then be slightly for casual while remaining professional.
  • Be ready to briefly describe your experience, showing how it relates it the job.
  • During interview time do not talk too much.
  • Avoid negative comments about past employers.
  • When given a chance, ask any questions that you have prepared in advance. Asking questions shows the interviewer that you are interested in the job. Your ability to ask straightforward, insightful questions lets the interviewer understand your perspective and concerns, as well as your judgment and analytical ability You can also follow up on anything that the interviewer tells you during the interview.
  • Find out when the company plans to make a hiring decision.
  • It is ok to ask about the package on offer and other benefits at the end of the interview.
  • End the interview with a handshake and thank the interviewer for his/her time.
  • Review your interview performance immediately after the interview. Think through what went well and where there was scope for improvement. This would help in future interviews. If required you can take the recruitment consultant’s help in reviewing the interview.
  • After your interview be sure to inform the recruitment consultant. Then the recruitment consultant would be able to follow up on your behalf.

Face To Face Interview Tips
  • Confirm date, time, location, contact person, interview process and list of documents required for the interview with your recruitment consultant.
  • Plan to reach the interview venue at east 30 minutes before the scheduled interview.
  • Go through your resume in detail and check for any mistakes and see if it needs to be updated. You should be able to answer questions on every point in the resume.
  • Wear formal attire. Ensure that your appearance is professional. If required go for a haircut / shave before the interview. Avoid smoking just before the interview.
  • If you are asked to bring certificates, mark sheets etc, get them xeroxed before the day of interview.
  • Go through a few commonly asked interview questions (both technical and HR) and prepare for them in advance. The recruitment consultant would be a good source for common questions.
  • Understand the company’s job requirements and match it to your skill set. Be prepared to answer the question “Why should we hire you?” You can ask the recruitment consultant detailed questions on the job description and the skills required.
  • Go through the company’s website. If possible ask your friends working in that company about work culture and other company specific details. You may also understand the company culture in detail from the recruitment consultant.
  • Make a list of questions to ask the interviewer about the company/offer.
  • Carry all your documents in a file / folder instead of a plastic bag.
  • Get a good night's sleep before your interview so that you'll be as ready for interview as possible.
  • Carry multiple copies of your resume (at least 4).
  • Put at least 2 references along with their contact details and designation in your resume. Get permission before using anyone as a reference. Make sure that they will give you a good reference. Use work colleagues as references as far as possible.
  • Carry your Interview Call letter. Also make sure to mention the recruitment consultant as the source.
  • On arrival inform the receptionist that you have been called for an interview.
  • If you have to reschedule the interview inform the company contact person well in advance.

Monday, June 11, 2012

How to make header & footer fixed

To make header & footer fixed, some people fix the height of content part. It may shows fine to their browser, but it might vary on another system with different resolution. So better to fix the header & footer. So if the content has less data, footer will still shown on bottom. If the content has more data, then automatically a scroll bar will be appeared.

Here is the css:-

#header
{
background: #94b4da;
height: 57px;
border-bottom: 2px solid #17047a;
position: fixed;
width: 100%;
top: 0px;
left: 0px;
text-align: left;
color: #fff;
padding: 5px 0px;
font-weight: bold;
}
.logo
{
width: 212px;
margin: 0px auto;
padding: 4px 0px;
}
#content
{
padding: 60px 0px 25px 0px;
width:100%;
left: 0px;
margin:0px;
}
#footer
{
background: #94b4da;
border-top: 2px solid #17047a;
position: fixed;
width: 100%;
bottom: 0px;
left: 0px;
text-align: center;
color: #fff;
padding: 5px 0px;
font-weight: bold;
height:20px;
}

Here is the design part :-