Sie sind auf Seite 1von 21

1)Code for updating the database by entering the data into textboxes in

aspx form?
Ans:There are several ways to do so. If you are using a dataset, you can
write changes to the dataset and then call the data adapter to send
changes from the dataset to the database.
Ans2:This walkthrough illustrates how to create a Web Forms page that
reads
and writes data to a database using SQL statements. For the walkthrough,
you will work with the Categories table of the SQL Server Northwind
database. In the page, you can select a record, edit it, and then save
it to the database.
...........................................................
2)How do you handle errors in stored procedures?
Ans:http://articles.techrepublic.com.com/5100-10878_11-1045786.html
...............................................................
3)How did you implemented classes in your project?
Ans:
...............................................
4)How did you implemented interfaces in your project?

Ans:
using ThirdPartyLibrary; // The only using statement
namespace Interfaces
{
public interface IConnection
{
...
BugFactory BugFactory();
}
}
..................................................
5)How did you call javascript from c#?
Ans:<SCRIPT LANGUAGE="JavaScript" src="javascript/projectJS.js">
..................................................
6)Differences between 1.1 and 2.0 versions of .net?
Ans: Some Importent New Features added in .net2.0
(a) Master Pages
(b) PreCompilation
(c) Sharing code in the application

(d) Themes and Skins


(Breaf
Descriptin
"http://www.geekinterview.com/question_details/33965")
.........................................................................................................................
7)Caching types?
Ans:3 types of catching:
1.data caching
2.output caching
3.fragment caching
.................................................................................................................

8)Session state modes?


Ans:(1) InProc Mode or InProceess this is the clarification of
InProc.

(2) SQL Server Mode

(3) StateServer Mode -->StateServer is memory based mode.

visit

(4) Out of process Mode -->This mode is best used when


performance is important but you can't guarantee which
server a user will request an application from.

(5) Off Mode -->Disable Session State.


.........................................................................................
9)what is the connection between IIS and client browser?
How do they communicate?
Ans:IIS is a web server. The client browser makes HTTP connections to a
server machine, which IIS handles and responds to.
............................................................
10)which session statemode u used in your current project?why?
Ans:
..........................................................
11)How did you handle exceptions in sql server?
Ans:Visit This Site Breaf Answer
"http://challagullainfo.blogspot.com/2010/12/error-handling-insqlserver.html"
................................................................

12)Two methos with same name in parent and inherited classes. If you
create
an objct of child which method will be invoked?
Ans:This is not possible...

suppose you can use this method useing shadows keyword....

after it's invoke parent class function.


..............................................................................................................

13)Garbage colllector how it works in Background?


Ans:
..........................................................................................
14)Asp.net page life cycle? Explain briefly?
Ans:Page_Init -- Page Initialization

LoadViewState -- View State Loading

LoadPostData -- Postback data processing

Page_Load -- Page Loading

RaisePostDataChangedEvent -- PostBack Change Notification

RaisePostBackEvent -- PostBack Event Handling

Page_PreRender -- Page Pre Rendering Phase

SaveViewState -- View State Saving

Page_Render -- Page Rendering

Page_UnLoad -- Page Unloading


.......................................................
15)Asp.net page events?
Ans:
Listing 1: Page Events Summary

Method

PostBack

Controls

Constructor

Always

All

AddParsedSubObject

Always

All

DeterminePostBackMode

Always

Page

OnInit

Always

All

LoadPageStateFromPersistenceMedium

PostBack

Page

LoadViewState

PostBack

All

ProcessPostData1

PostBack

Page

OnLoad

Always

All

ProcessPostData2

PostBack

Page

RaiseChangedEvents

PostBack

Page

RaisePostBackEvent

PostBack

Page

OnPreRender

Always

All

SaveViewState

Always

All

SavePageStateToPersistenceMedium

Always

Page

Render

Always

All

OnUnload

Always

All

...........................................................................
16)How iis recognize that which web application we are
requesting?
Ans:I guess from the url you are
requesting. In IIS we have virtual directories pointing to the url's ,
so depending on the url IIS knows which web application you are
requesting. Ans2:IN IIS While creating Virtual directory
we can mention framework version and while running framework will
identify which language from PAGE Directive
........................................................
17)How iis recognize that web application is developed in
which language?
Ans:
.........................................................

18)How iis will use authentication?


Ans:Assuming you have the latest and greatest IIS, you have several
choices
when working with authentication including:

IIS NT Challenge Response


A good choice if you are on a Windows Network. Can
require the use of IE. There is no proxy-server between the
browser and the server.
IIS Basic Authentication
Can expose your NT usernames and passwords unless all
connections are over SSL.
A Basic Authentication filter such as AuthentiX
Cannot compromise NT accounts. High performance.
Large numbers of users. Can validate against ODBC or
internal database. Many advanced features.
Write your own filter
Flexible, but resource intensive to build.
Cookie based authentication with ASP pages
Only protects ASP pages. Can be slow. Requires cookies.
Cookie-based systems can be susceptible to spoofing.
Self-Authenticating
Authentication.

ISAPI

dlls,

CGI-scripts

using

Basic

Good performance, all content generated though a single


URL. Doesn't use conventional directory/file/html format.
Certificate
based
Secure, but intimidating for webmasters and surfers alike. Requires
SSL.(Visit
Website
"http://www.devguru.com/features/tutorials/authentication/aut
hentication.asp")
.......................................................................................................................
...................
19)Is it pages will compile in server?
Ans:Yes the code behind compiles on server with the first call and product
dlls.
.................................................................
20)In server pages will compile or execute?
Ans:
After the pages have been compiled on dlls, on every call the system use
the dll + aspx to create the page. You can call it execution, maybe not of the
page but of the pool.
Actually the pool, use the strings-html that find on aspx, with the dll of the
page that is used to make the cycle of an aspx page and create the final
html
.................................................................................................................
21)What is diff between compile and execute?
Ans:
C is a high level language which means it is meant for humans to
understand not computers. For a computer to understand a C program it
has to be compiled, that is changed into machine language. Once a

program is in machine language then the computer can understand it and


perform the actions it describes (that is to run the program). A C program
need only be compiled once but (once compiled) it can be run any number
of times.

.......................................................................................................................
22)What is appdomain?
Ans:
An application domain is the CLR equivalent of an operation systems
process. An application domain is used to isolate applications from one
another. This is the same way an operating system process works. The
separation is required so that applications do not affect one another.
This separation is achieved by making sure than any given unique
virtual address space runs exactly one application and scopes the
resources for the process or application domain using that addess space.
More Inforamation Visit:
("http://www.csharpcorner.com/UploadFile/nagryum/Appdomain07102007081415AM/
Appdomain.aspx"/
"http://codebetter.com/raymondlewallen/2005/04/04/what-is-anapplication-domain-an-explanation-for-net-beginners/")
.....................................................................................................................................
..........
23)What is aspnet_issapi.dll?
Ans:
- ISAPI (Internet Server Application Program Interface) is a set of Windows
program calls that let you write a Web server application that will run
faster than a common gateway interface (CGI) application. A disadvantage
of a CGI application (or "executable file," as it is sometimes called) is that
each time it is run, it runs as a separate process with its own address space,
resulting in extra instructions that have to be performed, especially if many

instances of it are running on behalf of users. Using ISAPI, you create a


dynamic link library (DLL) application file that can run as part of the
Hypertext Transport Protocol (HTTP) application's process and address
space. The DLL files are loaded into the computer when HTTP is started
and remain there as long as they are needed; they don't have to be located
and read into storage as frequently as a CGI application.
Existing CGI applications can be converted into ISAPI application DLLs
without having to rewrite their logic. However, they do need to be written
to be thread-safe so that a single instance of the DLL can serve multiple
users.
A special kind of ISAPI DLL is called an ISAPI filter, which can be
designated to receive control for every HTTP request. You can create an
ISAPI filter for encryption or decryption, for logging, for request screening,
or for other purposes.
.....................................................................................................................................
......
24)What is aspnet_wp.exe?
Ans:
For faster execution of ASP.NET applications that are primarily based to be
hosted on IIS servers, the aspnet_wp.exe
comes into picture. This file (aspnet_wp.exe) is actually the ASP.NET
worker process. The worker process is introduced to actually share the
load on the IIS, so that application domains and other services may be
maintained by a single worker process.
The aspnet_wp.exe worker
process is a part of the Microsoft ASP.NET framework, and it is

responsible for most of the technical processes in the ASP.NET


framework. There may be multiple instances of ASP.NET worker process
running on IIS 6 (a process running as inetinfo.exe), depending
on multiple application pools. The worker process handles all the
requests passed to the ASP.NET framework, so we may say that its
actually the main engine that handles all requests pertaining to ASPNET.
For example, when a request for an .aspx page is recieved by the IIS
server, the dll called aspnet_isapi.dll passes this request to the
aspnet_wp.exe
worker
process.
(Visit
"http://forums.asp.net/t/1300149.aspx")
............................................................................
25)What is application?
Ans:the act of bringing something to bear; using it for a particular purpose;
...........................................................................
26)What is view state? Ans:Web Forms pages provide the ViewState
property as a built-in structure for automatically
retaining values between multiple requests for the same page. View state is
maintained as a hidden field in the page. For more information, see
ASP.NET State Management Overview.
You can use view state

to store your own page-specific values across round trips when the page
posts
back to itself. For example, if your application is maintaining user-specific
information that is, information that is used in the page but is not
necessarily part of any control you can store it in view state.
............................................................................
27)Why we use view state?
Ans:
1.No server resources are required The view state is contained in a
structure within the page code.
2.Simple implementation View state does not require any custom
programming to use. It is on by default to maintain state data on controls.
3.Enhanced security features The values in view state are hashed,
compressed, and encoded for Unicode implementations, which provides
more security than using hidden fields.
.........................................................................................................................
28)What are the validation controls? Explain the use of
validation controls?
Ans:
The .NET
Framework provides validation controls that validate user input and
display
appropriate error messages whenever invalid data is encountered in a
validation

control
Range Validator...to valaidate that a value entered is between some range of
values
Required Field Validator..to validate that a field in not left blank
Regular Expression Validator..to validate that the value entered is in a
specific format.
Custom Validator...we can define our own validations.
Compare Validator...to compare to values and validate them.
Validation Summary...to display the error message of the validations.
..........................................................................................................................
29)Validation controls are client side or server side?
Ans: ASP.NET validation controls provide two
ways of validation: Server-side or Client-side. The nice thing about
these Validation controls is that they will preform client-side
validation when it detects the browser is able (unless client-side
validation has been disabled),thus reducing roundtrips. And it will
preform server-side where necessary. This client-side/server-side
detection and validation is done without extra work
.............................................
30)How to make raise JavaScript at the page is displaying?

(which page event will use eg: page_load) ?


Ans:
..........................................................
31)What is session?
Ans:
A Session refers to all the request that a single client makes to
a server. A session is specific to the user and for each user a new session is
created to track all the request from that user. Every user has a separate
session and separate session variable is associated with that session. In case
of web applications the default time-out value for session variable is 20
minutes, which can be changed as per the requirement.
More Info:"http://www.roseindia.net/interviewquestions/servlet/sessiontracking.shtml"
....................................................................
32) Is it necessary to create session object?
Ans: No
......................................................................
33)What is application object?
Ans:

An application on the Web may consists of several ASP files that work
together to perform some purpose. The Application object is used to tie
these files together.
The Application object is used to store and access variables from any page,
just like the Session object. The difference is that ALL users share ONE
Application object (with Sessions there is ONE Session object for EACH
user).
The Application object holds information that will be used by many pages
in the application (like database connection information). The information
can be accessed from any page. The information can also be changed in one
place, and the changes will automatically be reflected on all pages.
Visit "http://www.w3schools.com/asp/asp_ref_application.asp"
.....................................................................................................................................
34)Diff between session and application object?
Ans:the session object is used to maintain the session of each user. If one
user enter in to the application then they get seesion id if he leaves from the
application then the session id is deleted.If they again enter in to the
application they get different session id.
But for application object the id is maintained for whole application.it
doesn't differ
Visit:"http://www.geekinterview.com/question_details/39704"
....................................................................................................................
35)When application object will create?
Ans:
Visit: "http://www.tricerat.com/support/Simplify
%20Suite/Creating_an_Application_Object.html"
..................................................................................................................................
36)When session object will create?
Ans:
when user login

.....................................................
37)Where u will store connection string?
Ans:
u can place the connection string in every .aspx page , but imagine u
have a project with hundreds of pages , can u imagine the time u will
spend to open each page and change the ConString , so its always better
to write it once in the web.config file and then from all the asp.net
pages to refer to the ConString that is written there .
................................................................
38)What is appsettings?
Ans:
The <appSettings> element of a web.config file is a place to
store connection strings, server names, file paths, and other
miscellaneous settings needed by an application to perform work. The
items inside appSettings are items that need to be configurable
depending upon the environment, for instance, any database connection
strings will change as you move your application from a testing and
staging server into production.
.....................................................................

39)How can i register my assembly in gac?


Ans:
I have created a dll using the Class library in .Net
(Using vb.net).
After that I have associated it with a strong name by
creating a .snk file using sn.exe then i have added this
to my vb.net application using the following tag in
assembly.vb file in my application
<Assembly: AssemblyKeyFileAttribute("sharedDll.snk")>
and the version info as
<Assembly: AssemblyVersion("1.0.1099.0")>

after this i want to configure it to GAC.


...........................................................
40)What is strong name?
Ans:

.....................................................................................................................................
......
41)How to generate strong name?
Ans:
Steps for Giving strong name to DLL
1. Open .net command prompt.
2. Go to the folder contanig DLL.
3. Type sn -k test.snk, you can use any file name instead of test. This
will create test .snk file in that folder.
4. Open the assemblyinfo.cs file of project.
5. Type
file
path
in
this
tag
[assembly:AssemblyKeyFile@"E:\hemant\practice\HP\bin\Debu
g\HP.snk")]
6. Build application, finally your strong name created for your DLL.
Example
->Created class library path E:\hemant\practice\HP
->Open command prompt go to Dll folder path.
.........................................................................................

42)How to register strong name with my class library?


Ans:

Das könnte Ihnen auch gefallen