Friday, September 24, 2010

Hands was a small component (component entry) _asp


Hands was a small component (component entry)

This article is mainly for the ASP wants to raise the level of their own people to write! The ASP code into components, developers not only accelerates the speed of ASP, but also to protect their code. This article was written out also for users to want to develop components on an introductory course!

Below, we will write a very simple components, with emphasis on know how to develop DLL component, rather than the complexity of code! They have to rely on your own efforts in the future.

Server-side components

First, the server-side components to be different from the client component. Client-side component is transmitted through the network, relying on HTML to work. And can only be useful in IE on. But the server-side component is running on the server side, it perform various operations on the server. Therefore, all browsers can enjoy, it relies on the server rather than the browser.

When IIS is an ASP request execution program, it will first be found in the ASP file, the code between the tags and execute it (can also be between the code). If the ASP program had previously been called, then it will compiled with the memory of the procedure to return HTML code to the user, if not, then it is recompiled. Here ASP CGI a little more than the speed advantage, because the CGI is used for each request is a thread. so far consumed server resources.

Want you to write the program itself will run in IIS!?! Now you on the list! Using VB5 (VB6 of course it is), you can create Dynamic Linked Libraries (DLL files) that can run directly in IIS ( asp file to the request if there are any).

System and software requirements

You need a 32-bit operating system to run ASP. Of course, you have to install IIS or PWS. We the following procedure was windows95 + PWS + VB5 environment development.

Here we go

Start your VB, select the ActiveX icon. This icon can be found in new construction! VB project will provide a default name (project1) and the class name (class1). We will all get rid of these two names. In the renamed before first make sure we have the Microsoft Active Server Pages Object Library, it is very useful in our process. from the menu, select "Project", and then selecting "quote" appears "reference" window, choose Microsoft Active Server Pages Object Library.

To the project and class name

Now we come to based on their hobbies to the project1 and named class1 to it! Name to them is also very important to the future, we will use the project name and class name to create an instance of this component! Later in detail.

How to rename, I do not want to say!
Our project name changed to Exmaple, class name Helloword

How to use project and class

Now we have our own project (Example1) and the class name (HelloWorld). Then we will use them in ASP code names to refer to this component. In ASP so we quote as follows:

Set ObjReference = Server.CreateObject ("ProjectName.ClassName")

A reference for our project is:

Set ObjReference = Server.CreateObject ("Example1.HelloWorld")

Now we will be able to call us with ObjReference created in the component function, subroutine. Now we will write a SayHello subroutine, the code we execute it as follows:

In order to use ASP in Helloword class method, you must write in such a OnStartPage
Functions. As follows:

Public Sub OnStartPage (PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
End Sub

Now, whenever the user to access a file with the components of ASP, IIS will send the ScriptingContext invited us to use our target. This includes all of the ASP ScriptingContext methods and properties. Implementations, which makes our ability to access to all ASP objects. look at the following code:

Public Sub OnStartPage (PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub

Then we will be able to be used in place of VB using ASP in MyApplication Application, empathy can replace the Request, Server ....., but we came here before to OnStartPage to state that these variables:

Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session




[Next]



Objects using ASP

Our variables can now standard ASP objects like to use it!, For example, we often used in the ASP Request.form () to collect data to submit the form. Now we are in our VB to achieve this function, the code is as follows:

With ASP to achieve:

In VB to achieve:

MyTempVariable = MyRequest.Form ("userName")
MyResponse.Write ("you entered" & MyTempVariable & "as your user name")

Instead of using MyResponse Response, we can use all the Response methods, of course, MyResponse name can easily to take, and you may even get Response.
The other thing we have to note that we have established in our class, write OnEndPage Functions, this OnStartPage the opposite! OnStartPage is to create objects, OnEndPage object is destroyed.

Public Sub OnEndPage ()
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub

SayHello method

Us to create a sub function that shows "Holle World". This SayHello method is a sub function HelloWorld this class, we later used in the ASP below shows this method

SayHello procedure, very simple!

Public Sub SayHello ()
MyResponse.Write ("Hello World")
End Sub

The preparation of a small component now complete, the remaining work is to compile the component, in the "Project" menu, save it, and take what names can we use Exmaple1.vbp it! Then used in the menu "make exmaple1.dll", to compile into a DLL file. a component of the real done!

Note that compile this component you must first turn off your PWS, and then compile the component. Otherwise VB will tell you that some components in use.

Used in the ASP component of our own.

When you correct the error in the compilation successfully compiled example1 this project, and now you have to come up with your favorite HTML editor to write the following statement, save for the ASP file.

After running you can see the result:

Hello World

Registration Component

If you want your friends and neighbors to share your components, then you'll have in your system, register your component. We generally use Regsvr32.exe to register the component. Registration of your component will appear in the Win95/Win98 the windows / system directory. Here is an example of registration:

Regsvr32.exe C: / wwwroot/Example1/Example1.dll

In your system, VB will automatically register you, so you rarely Regsvr32.exe

We are here just to write a very small component, you can own more written components, but also in a lot of control with VB.
Let us expand our program components to the function it! We hope to see lots of Chinese people component.






Recommended links:



Review Calculators And Converters



Hackers target companies to steal confidential



Win 2000/XP Automatically Restart Solution



DIRECTORY Astrology Or Biorhythms Or Mystic



"Fallout 3" Aircraft Carrier Task Of The City Of Clues And Details Of The Extension



TD commercial trial on April 1 the minimum Consumption of 118 yuan a complete experience



MKV to DivX



SharePoint 2010 Early Glance: Online Editor greatly improved



M2TS to MOV



Gateway Bank of China has become the odds



Using VMware, Vowed To Computer "cloned A Technique"



ASF to MPEG



Compare Benchmarking



Watch COOL mechanical picture production process



Thursday, September 16, 2010

Ten problems of answers interview sample


Before the interview to understand, practice on a few difficult questions to answer will help you prepare answers to other questions. Some questions asked more than some less but it is the basis for answering other questions.

1, why not talk about yourself?

Analysis: This is an open question. Where about are OK, but to pour forth one or two hours is not the employers want. This question is testing you can choose to focus and put it clearly, fluently expressed. Obviously, the questioner want you to put your background and want to get the location of link.

Response measures: There are several basic ways. A brief answer directly the questions asked, the other is in answer to the question asked before the request that more clear. In either case, you should soon put your answer to your skills, experience and your current job to be trained to come.

Sample answer: "I come from a small family, a brother, parents are still at work. After graduating from high school, I studied marketing degree. Day in a commercial organization as a marketing executive officer, learned a lot of knowledge management . For example, I solely responsible for the company as a wholesale business, total sales year to 200 million. where I learned how management personnel, under pressure to solve the problem. I hope to better use my skills. I I believe my experience and qualifications will enable me to face the future even greater challenges. "

Comments: just a brief personal history, quickly turn the focus of work-related skills and experience up. You may also request the interviewer to understand what he really wanted to concentrate a bit, as you can ask: "Do you want to know that I have received education or job-related skills and experience?" Most employers are willing to tell What they are interested in you?

2 Why should I hire you?

Analysis: This is a direct, positive, although this problem will not get such a clear question, but other issues will be raised later, the problem is not implied.

Answer responses: direct questions need straight answers, why should they hire you? The most clever answer to them, not in your favor. This issue will bring you to provide evidence to confirm that you can help them improve efficiency, reduce costs, increase sales and solve problems (such as work on time, improve customer service, one or more of the management organization, etc.).

Sample answer: "I am an experienced manager, staff team building, project implementation from the organization to encourage employees to cooperate, I am handy. Over the years, I have mastered the skills of a hire and keep people. In addition, I also good at helping companies successfully achieve transformation and staff training. I often lectures and demonstrations on major customers, our sales increased over the past two years, an average of 87%. "

Comments: In answer to provide a powerful example of the evidence, direct and self-confidence to sell yourself.

3 What are your main advantages?

Analysis: Like the previous questions, this question asked a very direct, but a bit hidden.

Answer responses: Your answer should first stress that you meet or already have skills. Hire your decision depends largely on these skills, you can back you with details of work-related skills. Answer, it must be brief.

Sample answer: "I have the ability to work towards the goal. Once I decided to do something, I do it well, for example, my wish is to become an excellent public relations manager, I like different kinds of people, service people, in order to achieve this goal. I am currently taking the course. "

Comments: If "My ability to learn, very adaptable." "Very good relationship" and so are the advantages may be made, but as far as possible to provide evidence of work-related, it will make you different.

4 What are your major weaknesses?

Analysis: This is a difficult problem. If the answer truthfully, you will destroy the work, the employer tried to make you at a disadvantage to observe your work in a similar predicament will react.

Answer responses: to answer such a question should be honest. Satisfactorily answer should be positive with a concise introduction to offset the negative issues.

Sample answer 1: "The workers accuse me of too much work into. I often arrange to work a little in advance of my work, rather late at night after work, so doing things to be done."

Sample answer 2: "I need to learn a little more patience. My temper is more anxious, I always want my work to complete in time for the first time. I can not stand idle."

Comment: Although the answer is their own shortcomings, but showed a positive effect, on the positive offset negative work.

5, you want the salary?

Analysis: If you pay demands are too low, it is clear to belittle their abilities; If you pay demands are too high, it would appear you are too heavy weight, the company can not afford good enough. Some employers are often seeking appointed positions in advance of the budget set, and therefore the first time the price is often the highest price they can give. They ask you just want to confirm whether the money would be sufficient to catch your interest in this work.

Response measures: the pay talks before, you have to learn about the work undertaken by their reasonable market value. In discussions with the other party may wish to insert as much as possible, "reasonable and market value" of vocabulary. Remember to discuss the original asking price when the lower easy, but once out cheap to mention up will be difficult after the very difficult indeed.

Sample answer 1: If you are not completely the performance of self-worth, the interviewer mentioned this problem on the test you, you may wish to refer to the following answer:

"Money is not my only concern. I would like to talk about my contribution to your company can do - if you allow the words."

"I pay no hard and fast requirement. I believe that your company will deal with the issue of my friendly and reasonable. I pay attention to is finding opportunities to work, so long as the conditions for fair, I do not mind too much."

Sample answer 2: If you have already stated the importance of the position, but the other still tell you to your reward is the best. You may wish to point out the nature of work it actually is worth more you get paid; clarify how you will strive to reduce the company's expenses; note in the work which you have to bear the costs themselves, to prove the value of your company, and that you require a higher return is the performance of your premise.

But if the other party do not want to compromise your work has not been definitely answered before, do not enable employers to exclude your consideration. You can ask: 'You decide to hire me? "If the answer is yes, you do not want to accept compensation Queshi, you can refuse:

"Thank you for giving me jobs. This post I want to to, but lower wages than I want, I can not accept this is one of the reasons the job. Perhaps you will reconsider, or to be able to make me more valuable to you to consider my work again. "

Comment: Even if the other party refuses, but also leave room for the consultation. If the employer needs you, he will be happy to meet your requirements. Once you have a standard against them to say "no", the transaction did not become the

6, your previous work experience and what we are linked?

Analysis: This question requires you compare with other job seekers, you have to overcome your background displayed any weaknesses.

Response measures: First, we introduce you to the edge. If the other job-seekers significantly more educated than you, work experience or knowledge of many more, then you should introduce to your advantage.

Sample answer 1: "As you know, I just finished training in computer programming to strengthen. Also, I have more than three years in the corporate work experience, including management of small businesses when the boss is away. I learned that dealing with financial and basic accounting. I also plan and manage over 300 thousand U.S. dollars worth of products. These experiences helped me understand the role of business computer programming. Although I new to programming, I was familiar with computer language. my education is comprehensive, I have more than 300 hours of computer operation time, this is my part of the curriculum. because I am a novice, I am determined to work harder than others to get the work done. "

Comments: This response highlighted the transferability of skills (accounting knowledge), and adaptive skills (time to complete the task, more work). This lack of experience programmer is necessary. In this case, the knowledge in school is also very important, but also as the "official" work so be emphasized.

Sample answer 2: "In previous work, I use a lot and do this work need the same technology. While enterprises are different, but the management companies need to have my ability with the organization and supervision. In the past seven years, I make my department to become our most profitable sectors. In my work, the average annual sales increase of 30%, profits increased by 30%. Since this is an old company, this performance is not general, seven years I got promoted twice, and quickly promoted to the post to the management. I would like you such a small, growth-oriented companies to accept the challenge, I feel my experience as I had to do this step prepared. "

Reviews: respondents understand the previous work and now consider the different areas, but he stressed the achievements and previous success. To accomplish this task, various management techniques will be used. Also continue to be answered about the challenges of dynamic small company.

7. You have any plans for the future?

Analysis: This problem is investigated motive of your work. Explore whether it can trust in you to work for a long time to stay here, and doing work.

Answer responses: your best response is honesty. It is always highlighted. I would not want you to also put out negative information, you should be prepared to be honest, positive answers to employer concerns. And which is of concern to the employer depends on your specific circumstances, personal backgrounds.

For example:

- Your job satisfaction? (If not you will leave the company?)

- Do you want to get married? (If married, will be suspended from duty to take care of you children?)

- You had to leave after a short work history? (If so, you will not have to give up this work?)

- You just move here, be temporary or temporary residents? (If so, you will not here living in, right?)

- Are you better than the conditions of the job requirements? (If yes, what makes you not to do another job?)

- What are your strengths and commitment to the work of development? (If not, who needs a no advantages and power of people?)

- What are the reasons to make you feel dissatisfied with it? (If so, employers will naturally try to find out.)

Sample answer 1: to work for a just person, he can reply:

"I realize that to create their own in this area, I am willing to begin. I thought about what I do, and certainly I do this work skills is required. For example, I am good with people. One of my past work, I have a week more than 1,000 different people to provide services. In my 18 months of work, I worked for more than 72,000 customer service, never received a formal complaint. the fact that , they are often praised for my services, I am thoughtful. I realize that I like with the public, think I can get the job was very happy. I want to learn better in their work and progress together with them. As I the contribution and value of the company continuously improve, I hope that I have a greater responsibility to consider the duties. "

Reviews: Employers want to know you will continue to work long and hard work. This response to concerns employers expressed comfort. (Note, This could work in fast food restaurant experience gained as the background.)

Sample answer 2: no work experience and experience only short-term, they can reply:

"I did some work (one or unemployed), I have learned to cherish decent, stable jobs. I have a wealth of various experiences, I learned a lot, I can use them for the work. I'm looking for a can settle down, work hard and endure the work. "

Comments: This is an acceptable answer, only answer is too short not to give evidence. Introduce their own examples of the best on the last word before. Some functions, such as sales work, requires you to have ambition, courage, or must we say. Other areas of work or the work of specialized agencies on request. You do not always expect the employer wants. If you can do correctly, you will work with any of the conditions required, and all this you only need to speak out through your mouth, is that simple.

8, your previous employer (teacher, referee, administrator, etc.) on your assessment of how?

Analysis: The second problem with the expectations of the employer. Employers want to know whether your adaptive skills, easy to get along with you, whether you are a good worker and so on. Your former employer may talk to your problem, of course, may not talk about. You know, many employers will hire you to check your letter before, if you are talking about the interview with your former employer say different, you will be in trouble.

Response measures: Be sure to discuss with your employer before your job search plan, you should seek the views of referee. To clearly tell them the type of work you are looking for and what you do to prepare grounds for a new job. If the previous employer will say something against you, you have to talk openly with him and see what he would say to write.

If you are fired or forced to resign, your future employer can justify. There are many successful people clashed with the former employer, if we can talk as much as possible out of these conflicts, many of the interviewer will understand. On a good relationship with your old employer, the wise approach is to ask him to write a text that material, in this case, they will not give you very bad letter. Large companies generally do not accept telephone to provide evidence, which allows you to greatly relieved, as long as the call to the company to clear.

If possible, use your good to prove those who said the letter. If your former bosses do not do so, to find people willing to help you will be fine. If you are fired, the best approach is to tell the truth. However, your former boss will not be too harsh, it will make people think you are to complain about no sense of responsibility. Furthermore, you are not from any fault. Must first recognize what is going on, then you should take the opportunity to talk about the lesson to be learned.

Sample answer: "my three previous employers will say that I am hard working, reliable, loyal, I left there because of personal conflicts. To do this I am deeply troubled, only to give up work there. You can call them, They are definitely on my evaluation. I think that was about as good to you, I still respect him. I got a few in that promotion opportunities, but as I increase power, the conflict has multiplied in the land more and more. We are mainly different types of people. I do not know that the problem would be so serious, because I just want to work as one. This is my fault, I realize that I should pay more attention to dealing with interpersonal relationships. "

Reviews: reply describes some of the positive skills, and illustrated with concrete examples, so it is strong.

9 Why did you find this post? Why here?

Analysis: The employer would like to know if you are the kind of company no matter what people live on the line. If so, he or she will not interest you. Employers are looking for work that want to solve the problems of people. They have reason to believe that such a person works harder, more efficient, and those who want to go to a special company of people as well.

Response measures: prior knowledge of what works best for your skills and interests is very important. To answer this question, we should talk about the objectives you choose the motives of that work requirements and you have the skills, specialized training, or job-related education certificate.

The question really has two implications. First, Why did you choose this position, and second, Why did you choose this company. If you have selected the company's grounds, or select the company is your greatest wish, you will be prepared to answer why the. If possible, before the interview, you have to find out about it in advance as possible. Contact with others, for detailed information, or to the library to see the company's annual report, or any way to make you understand the situation are necessary.

Sample answer: "I spent a lot of time to consider a variety of career possibilities in this respect the work I think the best for me, because this work requires a multitude of skills are good for me. For example, analyzing and solving The problem is my strength, in the previous work earlier than others, I can identify and solve problems. One time, I proposed a plan to make the return rate of rental equipment decreased by 15%, which sounds not high, but made an increase of 25,000 U.S. dollars of good benefits. The cost is only 100 U.S. dollars. now let me have your company seems to be a place to display their ability to solve problems. The company runs well, fast, learn to accept new ideas. your sales rose last year 30%, and you are going to introduce several major new products. If I'm here to work hard, prove the value of my own, I feel I have the opportunity to develop with the company.

Comment: This answer clever use of the "evidence" technique, so a good line manager or the identity of the secretary of excellence.

10, why not talk about your personal situation?

Analysis: A good few of those interviewed raised the issue so directly, through the casual, friendly conversation can be to understand the situation. In most cases, the interviewer will make every effort to prove that you inquire into unstable or unreliable information.

Response measures: There are other possible issues of concern to some employers, these questions only on certain character's guess. These are some of the problems are not related, but if employers want to know you can use this reliable, you have to go all out to deal with. Remember, even casually chatting also need to avoid reference to obscure problems. In response to individual situations, to the friendly attitude and self-confidence.

Sample answer:

A children's home: "I have two children, both in school. Them and one of my friends together, take care of the child is not a problem."

A take charge of the home: "I am not married, but I have two children. For me to have a stable income is important, care for children do not become a problem."

Young, single: "I did not marry, even if married, I would not change the intention to do full-time work, I can focus all efforts on the job."

New moved: "I decided to DepressionCulch for an extended stay, I rent an apartment, moving the company's six vehicles are unloading furniture."

Dependents: "I have a happy childhood, where my parents live only an hour flight away from my journey, I see them several times a year."

Leisure time: "I do not work, I mainly stay at home. I love to participate in the activities of community organizations, and I participate in activities at the church every week."

Comment: The answer can be expanded, can be used as a reference when you answer the question. Here to tell the interviewer that your personal situation does not affect your ability to work, but really can help you. If your personal life will disrupt your work, you must have employers will quickly lose patience. This is not their problem, nor should be their problem.






Recommended links:



Office Suites And Tools Catalogs



Flash MX Overview 1



Delphi Shop



Taobao shielding Baidu Sohu Baidu PPC Trouble



Convert m4v to mov



Gateway Bank of China has become THE odds



ogm Ps3



Record 2 room To visit a new generation of IDC



vb6 how to Dynamically add controls



Audio Format Changes for



Win32 does not require the Release of resources



CSFB will Salesforce.com downgraded to "neutral"



realplayer h.264



avchd to mov