Buy Electronics
Tuesday, April 20, 2010
Monday, April 19, 2010
ASP.NET Interview Questions
1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.
inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.
2. What’s the difference between Response.Write() andResponse.Output.Write()?
Response.Output.Write() allows you to write formatted output.
3. What methods are fired during the page load?
Init() - when the page is instantiated
Load() - when the page is loaded into server memory
PreRender() - the brief moment before the page is displayed to the user as HTML
Unload() - when page finishes loading.
4. When during the page processing cycle is ViewState available?
After the Init() and before the Page_Load(), or OnLoad() for a control.
5. What namespace does the Web page belong in the .NET Framework class hierarchy?
System.Web.UI.Page
6. Where do you store the information about the user’s locale?
System.Web.UI.Page.Culture
7. What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?
CodeBehind is relevant to Visual Studio.NET only.
8. What’s a bubbled event?
When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.
9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?
Add an OnMouseOver attribute to the button. Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");
10. What data types do the RangeValidator control support?
Integer, String, and Date.
11. Explain the differences between Server-side and Client-side code?
Server-side code executes on the server. Client-side code executes in the client's browser.
12. What type of code (server or client) is found in a Code-Behind class?
The answer is server-side code since code-behind is executed on the server. However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser. But just to be clear, code-behind executes on the server, thus making it server-side code.
13. Should user input data validation occur server-side or client-side? Why?
All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.
14. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server.Transfer does not update the clients url history list or current url. Response.Redirect is used to redirect the user's browser to another page or site. This performas a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.
15. Can you explain the difference between an ADO.NET Dataset and an
Valid answers are:
· A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
· A DataSet is designed to work without any continuing connection to the original data source.
· Data in a DataSet is bulk-loaded, rather than being loaded on demand.
· There's no concept of cursor types in a DataSet.
· DataSets have no current record pointer You can use For Each loops to move through the data.
· You can store many edits in a DataSet, and write them to the original data source in a single operation.
· Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.
16. What is the Global.asax used for?
The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.
17. What are the Application_Start and Session_Start subroutines used for?
This is where you can set the specific variables for the Application and Session objects.
18. Can you explain what inheritance is and an example of when you might use it?
When you want to inherit (use the functionality of) another class. Example: With a base class named Employee, a Manager class could be derived from the Employee base class.
19. What is meant by Assembly in Dot net?
Assembly divided into 5 parts Private,Shared,Satellite,Static and Dynamic.
Metadata having all the information of your code means class method Manifest having version public key strong name culture
20. Describe the difference between inline and code behind.
Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.
21. Explain what a diffgram is, and a good use for one?
The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. A good use is reading database data to an XML file to be sent to a Web Service.
22. Whats MSIL, and why should my developers need an appreciation of it if at all?
MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL. MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.
23. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
The Fill() method.
24. Can you edit data in the Repeater control?
No, it just reads the information from its data source.
25. Which template must you provide, in order to display data in a Repeater control?
ItemTemplate.
26. How can you provide an alternating color scheme in a Repeater control?
Use the AlternatingItemTemplate.
27. What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?
You must set the DataSource property and call the DataBind method.
28. What base class do all Web Forms inherit from?
The Page class.
29. Name two properties common in every validation control?
ControlToValidate property and Text property.
30. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
DataTextField property.
31. Which control would you use if you needed to make sure the values in two different controls matched?
CompareValidator control.
32. How many classes can a single .NET DLL contain?
It can contain many classes.
Labels: Interview Questions 0 comments
Friday, April 16, 2010
Study Suggests Brain Can Manage Only 2 Tasks at Once
For those who find it tough to juggle more than a couple things at once, don't despair. The brain is set up to manage two tasks, but not more, a new study suggests.
That's because, when faced with two tasks, a part of the brain known as the medial prefrontal cortex (MFC) divides so that half of the region focuses on one task and the other half on the other task. This division of labor allows a person to keep track of two tasks pretty readily, but if you throw in a third, things get a bit muddled.
"What really the results show is that we can readily divide tasking. We can cook, and at the same time talk on the phone, and switch back and forth between these two activities," said study researcher Etienne Koechlin of the University Pierre et Marie Curie in
Labels: General 0 comments
Learn Quick SQL syntax
SQL Syntax
Select Statement
SELECT "column_name" FROM "table_name"
Distinct
SELECT DISTINCT "column_name"
FROM "table_name"
Where
SELECT "column_name"
FROM "table_name"
WHERE "condition"
And/Or
SELECT "column_name"
FROM "table_name"
WHERE "simple condition"
{[AND|OR] "simple condition"}+
In
SELECT "column_name"
FROM "table_name"
WHERE "column_name" IN ('value1', 'value2', ...)
Between
SELECT "column_name"
FROM "table_name"
WHERE "column_name" BETWEEN 'value1' AND 'value2'
Like
SELECT "column_name"
FROM "table_name"
WHERE "column_name" LIKE {PATTERN}
Order By
SELECT "column_name"
FROM "table_name"
[WHERE "condition"]
ORDER BY "column_name" [ASC, DESC]
Count
SELECT COUNT("column_name")
FROM "table_name"
Group By
SELECT "column_name1", SUM("column_name2")
FROM "table_name"
GROUP BY "column_name1"
Having
SELECT "column_name1", SUM("column_name2")
FROM "table_name"
GROUP BY "column_name1"
HAVING (arithematic function condition)
Create Table Statement
CREATE TABLE "table_name"
("column 1" "data_type_for_column_1",
"column 2" "data_type_for_column_2",
... )
Drop Table Statement
DROP TABLE "table_name"
Truncate Table Statement
TRUNCATE TABLE "table_name"
Insert Into Statement
INSERT INTO "table_name" ("column1", "column2", ...)
VALUES ("value1", "value2", ...)
Update Statement
UPDATE "table_name"
SET "column_1" = [new value]
WHERE {condition}
Delete From Statement
DELETE FROM "table_name"
WHERE {condition}
Cross Join
A Cross Join is another way to combine two tables.A Cross Join should only be used with small tables.A Cross Join matches every row of the first table with every row of the second table WITHOUT ANY CONDITION., which results in all possible combination's. Cross Joins often generates a lot of data. Cross joins are also called Cartesian products.
Syntax :
----------
SELECT COLUMN_LIST FROM 1ST_TABLE_NAME CROSS JOIN
2ND_TABLE_NAME
Example:
-------------
SELECT L.Name,S.StateId from location L CROSS JOIN state S
Labels: SQL 0 comments
Young Men Who Smoke Have Lower IQ’s
Hugh Pickens writes,
'In the health profession, we've generally thought that smokers are most likely the kind of people to have grown up in difficult neighborhoods, or who've been given less education at good schools,' says Prof. Mark Weiser of Tel Aviv University's Department of Psychiatry, whose study was reported in a recent version of the journal Addiction. 'Because our study included subjects with diverse socio-economic backgrounds, we've been able to rule out socio-economics as a major factor. The government might want to rethink how it allocates its educational resources on smoking.' Prof. Weiser says that the study illuminates a general trend in epidemiological studies.
'People on the lower end of the average IQ tend to display poorer overall decision-making skills when it comes to their health,' says Weiser. 'Schoolchildren who have been found to have a lower IQ can be considered at risk to begin the habit, and can be targeted with special education and therapy to prevent them from starting or to break the habit after it sets in.'"
Labels: General 0 comments
Thursday, April 1, 2010
What Is Cloud Computing and How It Works
Here u go,
If you’re an executive at a large corporation. Your particular responsibilities include making sure that all of your employees have the right hardware and software they need to do their jobs. Buying computers for everyone isn't enough -- you also have to purchase software or software licenses to give employees the tools they require. Whenever you have a new hire, you have to buy more software or make sure your current software license allows another user.
Soon, there may be an alternative for this. Instead of installing a suite of software for each computer, you'd only have to load one application. That application would allow workers to log into a Web-based service which hosts all the programs the user would need for his or her job. Remote machines owned by another company would run everything from e-mail to word processing to complex data analysis programs. It's called cloud computing, and it could change the entire computer industry.
In a cloud computing system, there's a significant workload shift. Local computers no longer have to do all the heavy lifting when it comes to running applications. The network of computers that make up the cloud handles them instead. Hardware and software demands on the user's side decrease. The only thing the user's computer needs to be able to run is the cloud computing system's interface software, which can be as simple as a Web browser, and the cloud's network takes care of the rest.
Example: Web E-Mail
There's a good chance you've already used some form of cloud computing. If you have an e-mail account with a Web-based e-mail service like Hotmail, Yahoo! Mail or Gmail, then you've had some experience with cloud computing. Instead of running an e-mail program on your computer, you log in to a Web e-mail account remotely. The software and storage for your account doesn't exist on your computer -- it's on the service's computer cloud.
Cloud computing is closely related to grid computing and utility computing.
What is grid computing and utility computing?
Grid computing system, networked computers are able to access and use the resources of every other computer on the network. In cloud computing systems, that usually only applies to the back end.
Utility computing is a business model where one company pays another company for access to computer applications or data storage.
Labels: learn new stuff 0 comments
How Web Pages Work
At this moment,
- You are sitting at your computer.
- You are using a Web browser to read this page, and that browser could be Microsoft Internet Explorer, Firefox or maybe Netscape.
- You want to learn how Web pages work.
In order to talk about Web pages and how they work, you will want to understand four simple terms
- Web page - A Web page is a simple text file that contains not only text, but also a set of HTML tags that describe how the text should be formatted when a browser displays it on the screen. The tags are simple instructions that tell the Web browser how the page should look when it is displayed. The tags tell the browser to do things like change the font size or color, or arrange things in columns. The Web browser interprets these tags to decide how to format the text onto the screen.
- HTML - HTML stands for Hyper Text Markup Language. A "markup language" is a computer language that describes how a page should be formatted. If all you want to do is display a long string of black and white text with no formatting, then you don't need HTML. But if you want to change fonts, add colors, create headlines and embed graphics in your page, HTML is the language you use to do it.
- Web browser - A Web browser, like Netscape Navigator or Microsoft Internet Explorer, is a computer program (also known as a software application, or simply an application) that does two things:
- A Web browser knows how to go to a Web server on the Internet and request a page, so that the browser can pull the page through the network and into your machine.
- A Web browser knows how to interpret the set of HTML tags within the page in order to display the page on your screen as the page's creator intended it to be viewed.
- Web server - A Web server is a piece of computer software that can respond to a browser's request for a page, and deliver the page to the Web browser through the Internet. You can think of a Web server as an apartment complex, with each apartment housing someone's Web page. In order to store your page in the complex, you need to pay rent on the space. Pages that live in this complex can be displayed to and viewed by anyone all over the world. Your landlord is called your host, and your rent is usually called your hosting charge. Every day, there are millions of Web servers delivering pages to the browsers of tens of millions of people through the network we call the Internet.
Labels: learn new stuff 0 comments
Mobiles
MP3 Clips
Search...
Labels
- Csharp (3)
- Design Patterns (2)
- Dot Net (6)
- games (2)
- General (3)
- Interview Questions (9)
- learn new stuff (2)
- SQL (1)
- WCF (1)
