Ten ways to overcome shyness

1. Have faith in yourself: If you genuinely believe you are likeable, you will communicate your belief to others. Think about what you're good at and what you enjoy, and build on those abilities. For instance, if you prefer to listen than to talk, use that to show people how good a listener you are. You will be surprised what a dearth of good listeners there is!

2. Meet new people: To become less shy, you need to become comfortable around strangers. The best way to do this is by making an effort to meet new people. As you keep meeting new people you will feel much more at ease when you are in the presence of people you do not know very well.

3. Join a group: Join in activities which give you a chance to interact with people, such as fitness classes, a college activity group, a hobby club or an office discussion group. Once you are a part of one of these, make sure you always contribute in some way, no matter how small, and after a while, you'll get comfortable with it.

4. Don't take things too personally: If you want to succeed in the game of socialising, you can't take every comment, insinuation or joke as a personal affront. People sometimes say things they don't mean. However, if you are sure that someone has made an inappropriate comment about you, you should definitely stand up for yourself.

5. Don't fear rejection: The trick here is not to be self-conscious and simply focus on the activity and not the outcome. For instance, if you have something to say, don’t waste time thinking how you’ll sound or how people will react. Just say it as naturally as possible.

6. Take small steps: Start with a smile; show everyone you're friendly and approachable. Then progress to saying "hello." A few days after that, engage in small talk. Keep going, and as you gradually open yourself up to people, you will see it's not as hard as you thought.

7. Focus on others: Shyness and hesitation occur when you think about your flaws. Instead, focus on the person you're talking to. If you make a blunder, forget about it. Most people are more forgiving than you think.

8. Visualise: Visualisation means creating mental pictures of behaviours and situations that you would like to be involved in. You can daydream real-life situations. Start small, like a casual conversation with a co-worker. Then imagine scenarios that are out of character for you. This will help you handle these situations in real life.

9. Be well-informed: Have something to say. Keep up on current events, sports, amusing stories. If the conversation lulls, have new topics ready. And to ease the burden of initiating something, have a few icebreakers handy to get the ball rolling.

10. Build your self-esteem: Take pride in your skills and share what you can do with others. Stop negative thinking. When you catch yourself being too self-critical, counter it by saying something positive about yourself. Take pride in your opinions and ideas - and don't be afraid to voice them.

Positive Thoughts, Positive Feelings


Positive Thoughts, Positive Feelings


Thoughts cause feelings, and the wrong kinds of thoughts can cause stressful
feelings.


We can look at the same event different ways. One is in the optimistic way and
the other is pessimistically. It is the age old debate of whether to look at
the glass as half full or as half empty.


It helps if you can learn to look at the good things in life rather than the
ugly. For example, if you got into a car accident and totaled your car, you can
sit there and feel sorry for yourself, or angry for losing the car. These are
all self-defeating. On the other hand, you can thank god that you were not
killed or, worse yet, maimed in the car accidents. When you look at life's
events like that you will have something to smile at every event and that is
the power of positive living.


Robert Schuller, the author of "Tough times never last. Tough people do!" gives
the following guidelines in looking at problems in the proper perspective:


  1. Every Living Human Being Has Problems.

    Perhaps you are unhappy with your work. Isn't it good that you have a job rather
    than being unemployed? Many people have the mistaken notion that successful
    people do not have any problems. It is not true. Success tends to breed its own
    set of problems.


    Everyone has problems. A problem-free life is an illusion - a mirage in the
    desert. Accept the fact that everyone has problems. This will help you to move
    on with your life rather than sitting and feeling pity for yourself.




  2. Every Problem Has A Limited Life Span

    Every mountain has a peak and every valley has a low point. Similarly, life has
    its ups and downs. No one is up all the time or down all the time. Problems do
    get resolved in the long term. They don't last forever. History teaches that
    every problem has a limited life span. Your problems will not live forever; but
    you will! Storms are followed by sunshine. Winter is followed by spring. Your
    problems will get resolved given enough time.




  3. Every Problem Holds Positive Possibilities

    There are two sides to every coin. What may be a problem for one could be
    interesting opportunity to someone else. Hospitals are there because people get
    sick; garages are there because cars do break down; lawyers are there because
    people get in trouble with the law occasionally. Every cloud has a silver
    lining.




  4. Every Problem Will Change You

    When me meet problems head on in life, they leave their indelible mark on us.
    The experience could make you better or worse. It is up to you. What is certain
    is that problems never leave us the same way they found us. We will change.


    For example, let us say that you lost your job. You can sit and feel sorry for
    yourself. Or you can be aggressive and decide to do something about it. You are
    better than them. You want to show them what a mistake they did in firing you.
    You have to be fired before you can be fired up. That may be wake-up call you
    needed before embarking on a successful mission. Again, for every problem,
    there is a positive and negative side. Look for the positive side and work on
    it.




  5. You Can Choose What Your Problem Will Do To You

    You may not be able to control the problems, but you certainly can control your
    reaction or response to the problem. You can turn your pain into profanity or
    into poetry. The choice is up to you. You can control the reaction even if you
    cannot control the problem. You control the effect of the problem by
    controlling the reaction. It can make you tough or tender. It can make you
    better or bitter. It all depends on you.




  6. There Is A Negative And A Positive Reaction To Every
    Problem




Tough people, according to Schuller, have learned to choose the most positive reaction in managing problems. The key is that they manage their problems. Remember, we have little control on problems, we have control on how we react and manage the problem. Positive people chose to react positively to their predicaments.

Map of Mumbai

URL: http://www.aboutmumbai.com/mumbaimap.asp

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.

SQL: Loop through T-SQL Result Set

Declare @au_id Varchar(20)
SET ROWCOUNT 0
Select au_id, au_lname, au_fname into #Temp from authors
SET ROWCOUNT 1
Select @au_id = au_id from #Temp
While @@rowcount <> 0
Begin
Select * from #Temp Where au_id = @au_id
Delete from #Temp where au_id = @au_id
Select @au_id = au_id from #Temp
End
Set Rowcount 0
Drop table #Temp

SQL: Using Loop instead of Cursor

Sample 1:
~~~~~~
Declare @temp table
(
row_id int identity (1,1),
product varchar(50)
)

Declare @i int, @max int

Insert into #temp (product) Select product From products

set @max = @@rowcount
set @i = 1

While @i <= @max Begin Select product From #temp Where row_id = @i // Do your Processing here set @i = @i + 1 End Sample 2:
~~~~~~
DECLARE @Product VARCHAR(50)
DECLARE @ProductID INT -- I assume Product ID as primary Key

SELECT * INTO #Products FROM Products

WHILE EXISTS (SELECT * FROM #Products)
BEGIN
SET ROWCOUNT 1
SELECT @ProductID = ProductID, @Product = Product FROM #Products
SET ROWCOUNT 0

// Do your Processing here

DELETE #Products WHERE ProductID = @ProductID
END

SQL: Difference between “IS NULL” and “= NULL”

Article from www.SQLServerCentral.com

When a variable is created in SQL with the declare statement it is created with no data and stored in the variable table (vtable) inside SQLs memory space. The vtable contains the name and memory address of the variable. However, when the variable is created no memory address is allocated to the variable and thus the variable is not defined in terms of memory.

When you SET the variable it is allotted a memory address and the initial data is stored in that address. When you SET the value again the data in the memory address pointed to by the variable is then changed to the new value.

Now for the difference and why each behaves the way it does.

“= NULL”

“= NULL” is an expression of value. Meaning, if the variable has been set and memory created for the storage of data it has a value. A variable can in fact be set to NULL which means the data value of the objects is unknown. If the value has been set like so:

DECLARE @val CHAR(4)

SET @val = NULL

You have explicitly set the value of the data to unknown and so when you do:

If @val = NULL

It will evaluate as a true expression.

But if I do:

DECLARE @val CHAR(4)

If @val = NULL

It will evaluate to false.

The reason for this is the fact that I am checking for NULL as the value of @val. Since I have not SET the value of @val no memory address has been assigned and therefore no value exists for @val.

Note: See section on SET ANSI_NULLS (ONOFF) due to differences in SQL 7 and 2000 defaults that cause examples to not work. This is based on SQL 7.

“IS NULL”

Now “IS NULL” is a little trickier and is the preferred method for evaluating the condition of a variable being NULL. When you use the “IS NULL” clause, it checks both the address of the variable and the data within the variable as being unknown. So if I for example do:

DECLARE @val CHAR(4)

If @val IS NULL
PRINT ‘TRUE’
ELSE
PRINT ‘FALSE’

SET @val = NULL

If @val IS NULL
PRINT ‘TRUE’
ELSE
PRINT ‘FALSE’


Both outputs will be TRUE. The reason is in the first @val IS NULL I have only declared the variable and no address space for data has been set which “IS NULL” check for. And in the second the value has been explicitly set to NULL which “IS NULL” checks also.

SET ANSI_NULLS (ONOFF)

Now let me throw a kink in the works. In the previous examples you see that = NULL will work as long as the value is explicitly set. However, when you SET ANSI_NULLS ON things will behave a little different.

Ex.

DECLARE @val CHAR(4)

SET @val = NULL

SET ANSI_NULLS ON

If @val =NULL
PRINT ‘TRUE’
ELSE
PRINT ‘FALSE’

SET ANSI_NULLS OFF

If @val =NULL
PRINT ‘TRUE’
ELSE
PRINT ‘FALSE’

You will note the first time you run the = NULL statement after doing SET ANSI_NULLS ON you get a FALSE and after setting OFF you get a TRUE. The reason is as follows.

Excerpt from SQL BOL article “SET ANSI_NULLS”
The SQL-92 standard requires that an equals (=) or not equal to (<>) comparison against a null value evaluates to FALSE. When SET ANSI_NULLS is ON, a SELECT statement using WHERE column_name = NULL returns zero rows even if there are null values in column_name. A SELECT statement using WHERE column_name <> NULL returns zero rows even if there are nonnull values in column_name.
When SET ANSI_NULLS is OFF, the Equals (=) and Not Equal To (<>) comparison operators do not follow the SQL-92 standard. A SELECT statement using WHERE column_name = NULL returns the rows with null values in column_name. A SELECT statement using WHERE column_name <> NULL returns the rows with nonnull values in the column. In addition, a SELECT statement using WHERE column_name <> XYZ_value returns all rows that are not XYZ value and that are not NULL.
End Excerpt

So as defined by SQL92, “= NULL” should always evaluate false. So even setting the value explicitly means you will never meet the = NULL if condition and your code may not work as intended. The biggest reason where = NULL will shoot you in the foot is this, SQL 7 when shipped and installed is defaulted to ANSI_NULL OFF but SQL 2000 is defaulted to ANSI_NULL ON. Of course you can alter this several ways but if you upgraded a database from 7 to 2000 and found the = NULL worked only when you set if explicitly when you roll out a default 2000 server your code now breaks and can cause data issues.

Yet another reason to use IS NULL instead as under SQL 92 guidelines it is still going to evaluate to TRUE and thus your code is safer for upgrading the server.

Summary

If summary unless you need to check that the value of a variable was set to equal NULL and you have set ANSI_NULLS ON, then always use the “IS NULL” clause to validate if a variable is NULL. By using = NULL instead you can cause yourself a lot of headaches in trying to troubleshoot issues that may arise from it, now or unexpectedly in the future.

Technical Aspects

System.Data - consists of the classes that constitute the ADO.NET architecture, which is the primary data access method for managed applications. The ADO.NET architecture enables you to build components that efficiently manage data from multiple data sources.

Exceptions add significant overhead to your application. Do not use exceptions to control logic flow, and design your code to avoid exceptions where possible. For example, validate user input, and check for known conditions that can cause exceptions. Also, design your code to fail early to avoid unnecessary processing.

If System namespace is not present in the application, then the error is got in Inherits System.Web.UI.Page. This is because, if System.dll is not available in the application, then there can be no other working child namespaces of System namespaces.

Exceptions are expensive considering the performance. So it is better to use conditional checks rather using exceptions.

The @@scope_identity() is used to get the identity value of the last update. As the trigger is not in the scope of a stored procedure, hence the last update identity value for trigger can be achieved by using @@identity()

N'123' - Here "N" denotes a unicode string or nvarchar string. This is used when the argument required is of unicode format.

cmd.CommandTimeout = 5

select * from mUser
select top 10 * from mUser
select top 100 percent a.* from mUser a

DataAdapter supports optimum concurrency support.

Resource files ".resx" are compiled to ".resources" using "resgen" utility.

Event is always public and declared as: Public Event evt(ByVal sender As Object, ByVal e As EventArgs)
RaiseEvent evt(sender, e)
RaiseEvent is especially used when we want a specific event to be raised using WebControl or CustomControl.

ds.AcceptChanges() - Used to commit changes done to dataset.
ds.RejectChanges() - Used to rollback all the changes done to dataset.

da.Update is used to reflect the changes done from dataset or datatable to the database.

ds.Tables(0).GetChanges(DataRowState.Modified) - This statement is used to reflect only those changes to database that are modified and hence increase performance.
Also we can get specific rows from datatable for records Added, Deleted, Detached, Modified, Unchanged.

While updating modified data in the database if any of the concurrency conflict occur it raises Exception, which sets DataRow’s HasError Boolean value

Server.Transfer is used to transfer page information such as viewstate to another page.
Limitation of Server.Transfer is that the redirected page should reside on the same web server.
Querystrings cannot be used as the url doesn't change using Server.Transfer

Datatypes supported by RangeValidator are: String, Integer and Date.

With CodeBehind tag in the Page directive of .aspx page, the code is compiled at compile time. But using Src instead of CodeBehind compiles the code at runtime.So if any page code is frequently changed, then it is better to use Src instead of CodeBehind so that the code in .vb or .cs file is to be changed instead of changing the application .dll files.

The Web garden model is configurable through the section of the machine.config file. Notice that the section is the only configuration section that cannot be placed in an application-specific web.config file. This means that the Web garden mode applies to all applications running on the machine. However, by using the node in the machine.config source, you can adapt machine-wide settings on a per-application basis.

By design, the HttpApplication object looks for a class named after the requested ASPX file. If the page is named sample.aspx, then the corresponding class to load is named ASP.sample_aspx. The application object looks for such a class in all of the assembly folders of the Web application—the Global Assembly Cache (GAC), the Bin subfolder, and the Temporary ASP.NET Files folder. If no such class is found, the HTTP infrastructure parses the source code of the .aspx file, creates a C# or Visual Basic .NET class (depending on the language set on the .aspx page), and compiles it on the fly. The newly created assembly has a randomly generated name and is located in an application-specific subfolder of the following path: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files.

In .NET you can load a DLL but can't unload. I don't know if it's a good thing or a bad thing. In this case it's a bad thing. Here's why: every time a page is recompiled a new DLL is loaded into the AppDomain. The smallest unit that you can unload in .NET is an AppDomain. This means we have to unload the entire AppDomian to release old DLLs and have them scavenged.
A couple of options to make this happen:
Modify globals.asax or web.config. This causes a batch compilation. A fresh start, so to say.
Wait until numRecompilesBeforeApprestart compilations happen (15 by default).
Run iisreset or reboot.
ASP.NET worker process takes up too much memory and the framework restarts it. This is pretty much outside of your control.


Using ~ The tilde sign is used to get full url of the page specified.

DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the deallocation of the data pages of the table, which makes it faster. Of course, TRUNCATE TABLE can be rolled back.

The ASP.NET State Server is a Windows service that runs on any machine where Framework is installed.

Create the database that holds the session state. The .NET Framework SDK provides a script that creates the database for you; it’s called InstallSqlState.sql. To run it, open a command prompt window and type the following command:
osql -S localhost -U sa -P -i installsqlstate.sql
The database created is named: ASPState

An assembly with culture information is automatically assumed to be a satellite assembly.

Assemblies are units of versioning and deployment in .NET. Normally, assemblies contain executable code. However, assemblies can also be made by just using resources (non-executable data). These types of assemblies are called satellite assemblies. Resources are often used for localization. Without recompiling your application, you can change messages for a foreign audience.

Using AL command line utility you can embed your resources in an assembly. The assembly thus formed is nothing but a Satellite Assembly.

AL /t:lib /culture:en-GB /embed:mymessage.en-GB.resources /out:ResourcesDemo.resources.dll

Core data types such as Int32 are implemented in Mscorlib.dll

Struct is similar to Class, but Struct imposes less overhead. Hence Class is intended to represent complex datatypes.

Value types impose less overhead than reference types because they’re allocated on the stack, not the heap.

CLR uses heap that's called managed heap.

Hashtables implements Idictionary and hence cannot be XMLSerialized, but they can be BinarySerialized.

If State Server or SQL Server is used for state management, then the session object should be serialized. Otherwise an error is thrown while saving the unserialized object in the session variable.

Joins are faster than Sub-queries.

Clustured index is automatically applied when primary key is assigned to a table.
Clustured index information is stored in the table itself, whereas non-Clustured information is stored outside the table.
Insert can be slower on clustured indexes. When a row is to be inserted between two rows, then first the rows are to be adjusted such that the new row can be accomodated between the two rows. Whereas in clustured index, the index information is stored apart from table and hence the row can be added at the end of table and index information is stored in place other than table.
Clustured index is used when large amount or rows are returned especially using comparison operators.
Non-clustured index is used when minimum rows (1 row) is to be returned.
Clustured index can be applied on composite key.
If clustured index is increased from 3 or 4 index on a table, then it will degrade the performance.
Clustured index on table increases the performance.
There can be only one clustured index on one table whereas there can be multiple non-clustured index on one table.

Overloading means having two methods with same name but different signature.

Overriding means having two methods with same name and signature but one in base class and other in derived class.

Both base and derived class cannot have same methods due to ambuiguity. In such situation, the base class method should be specified with the "Overridable" tag and the derived class method should be specified with the "Overrides" tag. Hence the method of derived class is called upon execution.

Keyword "Overloads" specifies that the function is overloaded.

.NET does not provide destructors due to the implementation structure of CLR.
There are two methods Finalize and Dispose that can be used in place of destructors. The Finalize method is called by the garbage collector. We can override this method and use it. But it takes much time after which the object is dereferenced and hence the object stays in the memory for a long time. The Dispose method is not considered to be the best way, but it works without any problem. By calling Dispose method, the class objects are destroyed as soon as called. Both these methods are to be written in the class.

By default any class we create can be used as a base class from which other classes can be created.
Public NotInheritable Class ProductLine - The keyword NotInheritable prevents the class from inheriting.

Though both base and derived class have "Public Sub New()" or any constructor with same signature, then also they can reside without any need of overriding implementation.

By default, methods cannot be overridden by a subclass. To allow them to be overridden, the parent class must declare the method using the Overridable keyword. We can also explicitly disallow overriding through the use of the NotOverridable keyword. Of course since this is the default, this keyword is rarely used. If we then create a subclass, we can optionally override the behavior of method by using the Overrides keyword.

Public MustInherit Class LineItem - Creates a class that can be treated as base class and cannot be instanciated.

Public MustOverride Sub CalcPrice() - Such a method needs to be overrided and doesn't have End Sub. Such methods are called abstract methods or pure virtual functions.

We can combine these two concepts – using both MustInherit and MustOverride – to create something called an abstract base class. This is a class that provides no implementation, only the interface definitions from which a subclass can be created.

If any modifier is not specified before the declaration of method, then it is treated as Public by default.

Public shared is equivalent to Static.

Private shared variable works as static variable among different instances of class but cannot be accessed outside the class directly. Public shared works as static variable and is also accessible outside the class without instance. Hence we can say that Private shared is Private static and Public shared is Public static.

System.Guid datatype represents Global Unique Identifier. The Guid value can be fetched using Guid.NewGuid()

An abstract class is one that includes at least one method or property that must be overridden. If all the members of a class must be overridden, the class is called a pure abstract class. But even if only one member must be overridden, the class will be identified as abstract using the MustInherit attribute.

In VB.NET you can also use optional parameters to achieve similar functionality. However, it is recommended to use overloading instead to make your code consistent across languages.

The main difference between inheritance based programming and interfaces based programming is that - interfaces just specify signatures of properties and methods for a class. Your class "implements" the interface by providing implementation for various properties and methods. Unlike inheritance there is no "code" inherited from interfaces. Your class can implement one or more interfaces.

The overloads keyword is optional when overloading method.

Boxing is conversion of value type (integer, string, …) to reference type (object). And Unboxing is vise-versa.

Overloading and Overriding are types of Polymorphism.

Application_BeginRequest is called on arrival of each request whereas Application_Start is called when the first request is arrived for the application.

Response.Write cannot be used in Application_Start whereas it can be used in Application_BeginRequest.

RegisterStartupScript and RegisterClientScriptBlock

DataReader and DataRelation cannot be serialized.
HashTable cannot be xmlserialized but can be binaryserialized.

Difference between Public and Friend is that public method is accessible from other assembly also whereas friend method or class is accessible only in the current assembly. If you want that the method is also available to the inherited class of other assembly, then by using Protected Friend modifier, it is possible.

Protected modifier is accessible to other class also only if the other class is inherited class.

In Overloading, the method name remains the same, but the signatures must be different. In Overriding, the method name and the signature must be the same.

One assembly can have one or more namespaces. Also, one namespace can span across multiple assemblies. You can create nested namespaces. If you are using VS.NET then the project name acts as the default namespace name.

In VB.NET you can also use optional parameters to achieve overloading functionality. However, it is recommended to use overloading instead to make your code consistent across languages.

In order to override method in child class they need to be marked as Overridable (VB.NET) or virtual (C#) in the parent class. Then in the child class you can create a method with the same signature and specify that it overrides the base class method.

The main difference between inheritance based programming and interfaces based programming is that - interfaces just specify signatures of properties and methods for a class. Your class "implements" the interface by providing implementation for various properties and methods. Unlike inheritance there is no "code" inherited from interfaces. Your class can implement one or more interfaces.

An abstract class is said to be any class with at least one pure virtual function.

Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency. Abstraction refers to the act of representing essential features without including the background details or explanations.

Say, interface Interface1 consists a function "PrintMethod()". To use this method in the child class, this function needs to be defined in child class with the syntax such as: void Interface1.PrintMethod() { }

All methods declared in the interface must be defined in the child class. This helps in maintaining consistency.

Exceptions are unpredictable errors during runtime whereas Errors are predictable.

A preprocessor directive must be the only instruction on a line. Preprocessing directives are lines in your program that start with `#'. Using special preprocessing directives, you can include or exclude parts of the program according to various conditions i.e. Conditional Compilation.

REGASM is a superset of the TLBEXP utility in that it also does much more than generating a type library. It's also used to register the assembly, so that the appropriate registry entries are made to smooth the progress of the COM runtime and the .NET runtime to fastener up the COM aware client to the .NET component.
Usually a type library can be generated from an assembly using the regasm.exe utility. The regasm.exe utility not only registers an assembly and it also creates the required type library file, as shown here.
regasm Server.dll /tlb:Netserver.tlb

Difference between regasm and tlbexp is tlbexp only creates type library while regasm create the type library and creates necessary registry entry.

So if we want to register the com created from assembly directly to the computer, then we can use regasm utility. But if the generated com component is to be deployed to some another server for registration, then it is better to use tlbexp utility.

Windows PE is executed by the operating system, but .NET PEs are turned over to the .NET Framework’s CLR.

Metadata is the complete way of describing what is in a .NET assembly. Digging into the metadata yields the types available in that assembly, viz. classes, interfaces, enums, structs, etc., and their containing namespaces, the name of each type, its visibility/scope, its base class, the interfaces it implemented, its methods and their scope, and each method’s parameters, type’s properties, and so on.

Metadata describes the contents in an assembly, whereas the manifest describes the assembly itself, providing the logical attributes shared by all the modules and all components in the assembly. The manifest contains the assembly name, version number, locale and an optional strong name that uniquely identifying the assembly.

Steps to assign strong name to the assembly:
sn.exe -k PublicPrivateKeyFile.snk --- The file generated can be used with any assembly till the assembly is not added to GAC.
--- In AssemblyInfo.vb

InstallUtil.exe is a .NET utility to install Windows Service.

Session.Contents("varname").Remove()
Session.Contents.RemoveAll()
Session.Abandon()

- Application doesn't restart until the page is changed upto 15 times.

The code required to access fields is more readable and compact.
The Intellisense capability within the Visual Studio .NET code editor can automatically complete lines as you type.
The compiler can catch strongly typed DataSet type mismatch errors. It is better to detect type errors at compile time than at run time.
However, strongly typed DataSets can be cumbersome if the database structure changes, for example when field and table names are modified. In this case, the typed DataSet class has to be regenerated and all dependent classes must be modified.

If the base class does not contain implementation code and will never be instantiated as an object, it is known as an abstract class.

The connection doesn't need to be opened and closed if DataAdapter is used to fill the Dataset. It is because the dataadapter itself opens and closes the connection. The time for opening and closing connection is optimized by the DataAdapter. But if more than one DataSet is filled, then the connection is required to be opened explicitly.

reader.NextResult() - it is used to fetch next recordset within the reader. It is usually used when

CommandBehavior.SequentialAccess

set @str1 = replace(@str1,CHAR(13),'
')
This function replaces the line-feed character to
for html files.

Positive Thoughts

  • Don't let urself die before ur heart stops......
  • All that we are is the result of what we have thought. - Buddha
  • Treat yourself with mind and others with heart.
  • As you receive goodness from others, pass it on.
  • What would you attempt to do if you knew you would not fail?
  • Being focused in the moment allows you to release the fear of the future and the guilt of the past.
  • A successful relationship requires falling in love many times ----- with the same person.
  • Obstacles are those frightful things you see when you take your mind off your goals.
  • Vision is not enough, it must be combined with venture. It is not enough to stare up the steps, we must step up the stairs.
  • If you get up one more time than you fall, you will make it through.
  • The world becomes a better place the moment you act on an intention to serve another.
  • You can choose to think higher thoughts.
  • One must conquer one's own self, for difficult it is to conquer it. One who does so, is blessed in this world and also in the next. - Lord Mahavir
  • There are three sides to any argument: your side, my side and the right side.
  • Love is everywhere, but you must choose to see it.
  • We must believe in luck. For how else can we explain the success of those we don't like?
  • The only way to get what you want is to ask for it.
  • Self acceptance is the doorway to greatness.
  • You are not limited by the thoughts of others. Your only limitation is the thoughts you choose to think.
  • Power is only yours if you claim it.
  • Your ability to create positive thoughts is unlimited.
  • Faith and trust keep you in the flow of God's goodness and mercy.
  • We are all God's children and therefore worthy of healing.
  • You can be transformed by loving yourself.
  • You are capable of accomplishing great things through the power of your consciousness.
  • True happiness is only in the moment.
  • You are more than okay. You are great!
  • Your truth is valuable. Speak it.
  • Your goodness lies in the present moment. Accept it now!
  • The one sure ingredient to success is to never, never give up.
  • If you want to change the world change the way you think about the world.
  • This new day is your opportunity to achieve.
  • I trust that God wants me to be happy.
  • As you focus on what is good about people, you enable them to achieve it.
  • A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
  • Formulate and stamp indelibly on your mind a mental picture of yourself as succeeding. Hold this picture tenaciously. Never permit it to fade. Your mind will seek to develop the picture...Do not build up obstacles in your imagination.
  • U learn in life when u lose
  • We must believe in luck. For how else can we explain the success of those we don't like?
  • I is always capital.
  • When you listen to others you are listening to yourself.
  • Face your past without regret. Handle your present with confidence. Prepare for the future without fear.
  • A good example has twice the value of good advice.
  • A slip of the foot you may soon recover, but a slip of the tongue you may never get over.
  • Hope is the foundation of change. Encouragement is the fuel.
  • Do one's best today to prepare for tomorrow.
  • You can have everything in life that you want if you will just help enough other people get what they want.
  • The power of accurate observation is frequently called cynicism by those who don't have it.
  • Focus on the journey, not the destination. Joy is found not in finishing an activity but in doing it.
  • Don't worry that there's not enough time. Just get started and go from there. Don't worry that it won't be perfect. Just get going and give it your very best. Don't be concerned about what others may think. Just go ahead and do what you know is best, what you know is right for you.
  • Don't be discouraged when you encounter obstacles. Just work your way diligently through each one.
  • Don't give up when the first attempt does not work out. Just learn from your mistakes and get going again.
  • There will always be plenty of excuses for not taking action, yet to achieve you must choose to look beyond those excuses. Just go ahead and get it done.
  • The Law of Win/Win says, "Let's not do it your way or my way; let's do it the best way.
  • Change yourself, or increase your context/perspective, so that it's no longer a problem.
  • Failure leads to success unless you quit.
  • Ideas without action are worthless.
  • Courage is the thing. All goes if courage goes.
  • Whether you think that you can, or that you can't, you are usually right.
  • If God is within you who can be against you?
  • You learn in life when you loose.
  • You have to know how to accept rejection and reject acceptance.
  • A man can fail many times but he isn't a failure until he gives up.
  • Failure is only the opportunity to more intelligently try again.
  • First say to yourself what you would be; and then do what you have to do.
  • We are the echo of the future.
  • Just remember, when you think all is lost, the future remains.
  • The only place success comes before work is in the dictionary.
  • Success is the maximum utilization of the ability that you have.
  • Success is getting what you want; happiness is wanting what you get.
  • Don't limit your challenges - challenge your limits.
  • Courage is not the absence of fear, but rather the judgement that something else is more important than fear.
  • You must do the thing you think you cannot do.
  • Confidence comes not from always being right but from not fearing to be wrong.
  • I believe that one of life's greatest risks is never daring to risk.
  • Do not go where the path may lead, go instead where there is no path and leave a trail.
  • Men do not fail; they give up trying.
  • We are what our thoughts have made us; so take care about what you think. Words are secondary. Thoughts live; they travel far. -- Swami Vivekananda
  • He is able who thinks he is able. --Lord Buddha
  • Be not afraid of growing slowly, be afraid only of standing still. --Chinese Proverb
  • First they ignore you, then they laugh at you and then you win. -- Mahatma Gandhi
  • Beware of false knowledge; it is more dangerous than ignorance.
  • While one person hesitates because he feels inferior, the other is busy making mistakes and becoming superior.
  • God gives every bird its food, but He does not throw it into its nest.
  • People forget how fast you did a job - but they remember how well you did it.
  • The big secret in life is that there is no big secret. Whatever your goal, you can get there if you're willing to work.
  • The difference between a successful person and others is not a lack of strength , not a lack of knowledge, but rather a lack of will. --Vincent Lombardi (1913-1970)
  • The pessimist sees the difficulty in every opportunity; the optimist, the opportunity in every difficulty. -- L.P. Jacks
  • Believe, when you are most unhappy, that there is something for you to do in the world. So long as you can sweeten another's pain, life is not in vain. -- Helen Keller
  • You can often find in rivers what you cannot find in oceans. . --Indian Proverb
  • Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. --Chinese Proverb
  • A strong positive mental attitude will create more miracles than any wonder drug.
  • You can discover what your enemy fears most by observing the means he uses to frighten you.
  • Quit now, you'll never make it. If you disregard this advice, you'll be halfway there.
  • We make a living by what we get, we make a life by what we give. --Sir Winston Churchill
  • It is better to be hated for what you are than to be loved for what you are not.
  • If you're afraid to let someone else see your weakness, take heart: Nobody's perfect.
  • How you view the world is your choice.
  • Courage is the thing. All goes if courage goes.
  • Everyone has a will to win but very few have the will to prepare to win.
  • Never fall in Love, but rise in Love
  • The best and most beautiful things in the world cannot be seen or even touched. They must be felt with the heart. --Helen Keller
  • Study as if you were to live forever. Live as if you were to die tomorrow. --Mahatma Gandhi
  • Obstacles are those frightful things you see when you take your eyes off your goal.
  • Aaj karo so kal karo, Kal karo so parso, itni bi jaldi kya hai janab, jab jina hai barso
  • You have to know how to accept rejection and reject acceptance.
  • Failure is only the opportunity to more intelligently try again.
  • A man can fail many times but he isn't a failure until he gives up.
  • Being focused in the moment allows you to release the fear of the future and the guilt of the past.
  • Everybody makes mistakes; that's why they put erasers on pencils.
  • The best way to cheer yourself is to try to cheer someone else up.
  • We don't see things as they are, we see things as we are.
  • When it is darkest, men see the stars.
  • Don't go through life, grow through life.
  • That's what I consider true generosity. You give your all, and yet you always feel as if it costs you nothing.