Body Language

Arms crossed over chest - Defensiveness or anxiety
Swinging arm - Want to walk away from a situation
Eye blinking - Fast blinking signals stress
Downward gaze - Feeling defeated
Taking notes - Shows interest or involvement
Hand over mouth - Can mean boredom
Arms behind head and leaning back - Looking for power or control
Unbuttoning coat - Openness
Buttoning coat - Feels trapped and wants to leave
Standing with hands behind back - Confidence
Clearing throat - Nervousness
Rubbing back of neck - Defensiveness
Hands flat on table - Ready to agree
Stroking chin - Evaluating or thinking
Foot tapping - Impatience
Rubbing the eye - Doubt or disbelief
Rubbing hands - Anticipation
Tilted head - Interest
Pulling / tugging ear - Indecision

Learn to say "NO"

ARTICLE – DON’T SAY “YES” WHEN YOU WANT TO SAY “NO”

Hello Friends,

Greetings from Shabbar Suterwala.

Tell me if this sounds familiar -- someone asks you to do something thatyou really don't want to do or you honestly don't have time for. It mightbe a request or an unreasonable request from a friend, a neighbour, a close relative, a familty member, your office colleague or your boss for just working late. But you feel like you will let the other persondown if you say no. You feel GUILTY already, and you haven't evenresponded yet! So you say, "Sure," even though doing so is going to putyou under tremendous stress and PRESSURE. You know that you will probablyend up resenting this activity, and maybe even ducking some of yourresponsibilities because your heart's just not in it, but you go ahead andagree anyway.

Why are we so afraid to tell people "NO"? For some reason, we have beentaught that "no" is DISRESPECTFUL -- and even insulting. We seem to valueother people's time more than our own -- feeling that we need to bend overbackward to accommodate others, even if it inconveniences us. I know we'reatoning for the "me" 1980's, but let's be reasonable! "No" is actually oneof the healthiest words that can come out of your mouth. When you tellsomeone "no," you are really saying that you understand and accept yourown LIMITS, and don't want to do a shoddy job by overwhelming yourself.That you value your time and priorities and aren't willing to take awayfrom the truly important things in your life. A little selfishness isnecessary, if you want to maintain a balanced and sane life!

So how do you say "NO" without insulting the other person, feelingconsumed with guilt, or hurting your own credibility? We need to find away to say "no" without dragging up all of those HIDDEN FEARS -- they'llthink I'm lazy or selfish, that I have no career drive, that I'm notambitious, that I have no concern for other people. And it's time to giveup all of those roles you're so proud of -- supermom, martyr, hero -- butare keeping you from finding true peace. Once you've accepted that youhave the right (and often responsibility) to turn someone down, you can doit in a way that doesn't seem like a REJECTION. Let me show you how:

Here are 20 ways to say "NO" without hurting others

"I CAN'T RIGHT NOW, BUT I CAN DO IT LATER"
"I'M REALLY NOT THE MOST QUALIFIED PERSON FOR THE JOB"
"I JUST DON'T HAVE ANY ROOM IN MY CALENDAR RIGHT NOW"
"I CAN'T, BUT LET ME GIVE YOU THE NAME OF SOMEONE WHO CAN"
"I HAVE ANOTHER COMMITMENT"
"I'M IN THE MIDDLE OF SEVERAL PROJECTS AND CAN'T SPARE THE TIME"
"I'VE HAD A FEW THINGS COME UP AND I NEED TO DEAL WITH THOSE FIRST"
"I WOULD RATHER DECLINE THAN END UP DOING A MEDIOCRE JOB"
"I'M REALLY FOCUSING MORE ON MY PERSONAL AND FAMILY LIFE RIGHT NOW"
"I'M REALLY FOCUSING MORE ON MY CAREER RIGHT NOW"
"I REALLY DON'T ENJOY THAT KIND OF WORK"
"I CAN'T, BUT I'M HAPPY TO HELP OUT WITH ANOTHER TASK"
"I'VE LEARNED IN THE PAST THAT THIS REALLY ISN'T MY STRONG SUIT"
"I'M SURE YOU WILL DO A WONDERFUL JOB ON YOUR OWN"
"I DON'T HAVE ANY EXPERIENCE WITH THAT, SO I CAN'T HELP YOU"
"I'M NOT COMFORTABLE WITH THAT"
"I HATE TO SPLIT MY ATTENTION AMONG TOO MANY PROJECTS"
"I'M COMMITTED TO LEAVING SOME TIME FOR MYSELF IN MY SCHEDULE"
"I'M NOT TAKING ON ANY NEW PROJECTS RIGHT NOW"
or a simple, straight, direct "NO"

Understand Sessions

FAQ's:
Question list:
Q: Session states works on some web servers but not on others. A: Maybe machine name problem. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q316112 .
Q: Why isn't Session_End fired when I call Session_Abandon? A: First of all, Session_End event is supported only in InProc mode. In order for Session_End to be fired, your session state has to exist first. That means you have to store some data in the session state and has completed at least one request.
Q: Why are my Session variables lost frequently when using InProc mode? A: Probably because of application recycle. See http://support.microsoft.com/default.aspx?scid=kb;en-us;Q316148
Q: Why does the SessionID remain the same after the Session times out or abandoned? A:Even though the session state expires after the indicated timeout period, the session ID lasts as long as the browser session. What this implies is that the same session ID can represent multiple sessions over time where the instance of the browser remain the same.
Q: Why does the SessionID changes in every request? A: This may happen if your application has never stored anything in the session state. In this case, a new session state (with a new ID) is created in every request, but is never saved because it contains nothing.
However, there are two exceptions to this same session ID behavior: - If the user has used the same browser instance to request another page that uses the session state, you will get the same session ID every time. For details, see "Why does the SessionID remain the same after the Session times out?" - If the Session_OnStart event is used, ASP.NET will save the session state even when it is empty.
Q: Can I share session state between ASP.NET and ASP pages? A: Yes! Here is our article on how to do this in either direction using two "intermediate" pages. And here is an article on how to do it with SQL Server.
Q: What kinds of object can I store in session state? A: It depends on which mode you are using: - If you are using InProc mode, objects stored in session state are actually live objects, and so you can store whatever object you have created. - If you are using State Server or SQL Server mode, objects in the session state will be serialized and deserialized when a request is processed. So make sure your objects are serializable and their classes must be marked as so. If not, the session state will not be saved successfully. In v1, there is a bug which makes the problem happen unnoticed. See this KB for more info: http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;q312112
Q: How come Response.Redirect and Server.Transfer is not working in Session_End? A: Session_End is fired internally by the server, based on an internal timer. Thus, there is no HttpRequest associted when that happens. That is why Response.Redirect or Server.Transferdoes not make sense and will not work.
Q: Do I have a valid HttpContext in Session_End? A: No, because this event is not associated with any request.
Q: Will my session state be saved when my page hit an error? No. Unless you call Server.ClearError in your exception handler.
Q: How do I use session state with web services? A: The extra trick needed is on the caller side. You have to save and store the cookies used by the web service. See the MSDN documentation on HttpWebClientProtocol.CookieContainer property.
However, please note if you're using proxy object to call a web service from your page, the web service and your page cannot share the same session state due to architecture limitation.
This can be done if you call your web service through redirect.
Q: I am writing my own HttpHandler. Why is session state not working? A: Your HttpHandler has to implement the "marker" interface IRequiresSessionState or IReadOnlySessionState in order to use session state.
Q: I am using a webfarm, and I lost session state when directed to some web servers. A: For session state to be maintained across different web servers in the web farm, the Application Path of the website (For example \LM\W3SVC\2) in the IIS Metabase should be identical in all the web servers in the web farm. See KB 325056 for details.
Q: Why isn't session state availabe in the Application_OnAcquireRequestState (or other) event handler? A: Session state is available only after the HttpApplication.AcquireRequestState event is called. For details, see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhandlingpublicevents.asp
Q: If using "cookieless", how can I redirect from a HTTP page to an HTTPS page? A: Try this: String originalUrl = "/fxtest3/sub/foo2.aspx"; String modifiedUrl = "https://localhost/" + Response.ApplyAppPathModifier(originalUrl); Response.Redirect(modifiedUrl); NOTE: Fully qualified URLs in the response.redirect, server.transfer, and FORM action tags cannot be used with cookiless sessions. Here is an example of a fully qualified URL: http://www.eggheadcafe.com/default.asp More info here:
Q: What isn't Session available in my event handler in global.asax? A: It depends on which event you're handling. Session is available only after AcquireRequestState event.
Q: Does session state have a locking mechanism that serialize the access to state? Session state implements a reader/writer locking mechanism: - A page (or frame) that has session state write access (e.g. ) will hold a writer lock on the session until the request finishes. - A page (or frame) that has session state read access (e.g. ) will hold a reader lock on the session until the request finishes. - Reader lock will block a writer lock; Reader lock will NOT block reader lock; Writer lock will block all reader and writer lock. - That's why if two frames both have session state write access, one frame has to wait for the other to finish first.

Web Service Overview

Web Service methods cannot be static.

Right-click on the WebReferences-->WebService and then click "Update Web Reference" to update the web service from client application.

When any new methods are added in the web service, then click "Update Web Refrence" to use new method.

Reference.vb file in the "Web References" folder i.e. near bin folder. It consists of the declaration code for remote web service. So when any method is called, then its argument list is displayed.

For client application, if the web reference url is to be kept dynamic and not static, then set the property "URL Behaviour" of the selected WebReference to "Dynamic".
Dynamic-Specifies a property of the Web reference whose value comes from the Web.config or App.config file of the application.

WebMethod(MessageName:="GetCurrencyType")
The ":=" sign is used to directly set the particular argument of the method even if multiple arguments are present.

Imports System.Web.Services - This namespace is used in the top of .asmx file so as to use webservice.

The Object can be passed in webservice when it is serialized. To serialize the non-serialized object, create a
public class ---
or
public function ---
and then use after making it serialized.


Imports System.IO
Imports System.Xml.Serialization
'Set up product object.
Dim p As New clsProduct()
p.Name = "Widget"
p.Description = "Faster, better, cheaper"
p.Qty = 5
'Serialize object to a text file.
Dim objStreamWriter As New StreamWriter("C:\Product.xml")
Dim x As New XmlSerializer(p.GetType)
x.Serialize(objStreamWriter, p)
objStreamWriter.Close()
'Deserialize text file to a new object.
Dim objStreamReader As New StreamReader("C:\Product.xml")
Dim p2 As New clsProduct()
p2 = x.Deserialize(objStreamReader)
objStreamReader.Close()

'Display property values of the new product object.
Console.WriteLine(p2.Name)
Console.WriteLine(p2.Description)
Console.WriteLine(CStr(p2.Qty))
Console.ReadLine()


Server.ClearError - Clears the previous exception.



When you use SQLServer session state mode, if you try to store an instance of a class that is not marked as serializable into a session variable, the request returns without an error. However, ASP.NET actually fails to save the session data and blocks subsequent requests in the same session.

This same behavior occurs when you use StateServer session state mode

CAUSE
This problem occurs because the class is not marked as serializable.
RESOLUTION
To resolve this problem, add the [Serializable] attribute to mark the class as serializable

Type - OOPS

Abstract = MustInherit
Virtual = MustOverride


Types declared 'Private' must be inside another type.
So class is always 'Public'.
'Public' variables are declared inside class but not inside method as method is not a type.
There can be 'Private' constructor, but is of no use.

Generalization forms a broader concept from a more narrow concept
Example: Square --> Shape (square class inherited from shape class)

Specialization forms a narrow concept from a broader concept
Example: Shape --> Square (shape class is a base class of square class)

The choice of whether to design your functionality as an interface or an abstract class (a MustInherit class in Visual Basic) can sometimes be a difficult one. An abstract class is a class that cannot be instantiated, but must be inherited from. An abstract class may be fully implemented, but is more usually partially implemented or not implemented at all, thereby encapsulating common functionality for inherited classes.

'Public' is not valid on an interface method declaration.

Interface cannot be inherited but it is implemented. All the methods within the interface must also be implemented. For example:
Public Sub Calculate() Implements TestInterface.Calculate
---
End Sub

Class or module cannot be declared as 'Shared'.

Module cannot be inherited or instantiated. The methods within the module can be directly accessed.
Example: Module1.ModuleCheck()

Module is not a 'type' and hence cannot be inherited or instantiated.

Any object that is not a 'type' cannot be inherited or instantiated.