Documente Academic
Documente Profesional
Documente Cultură
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
visit
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...
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:
.........................................................
ISAPI
dlls,
CGI-scripts
using
Basic
.......................................................................................................................
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
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?
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.
.....................................................................
.....................................................................................................................................
......
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.
.........................................................................................