Академический Документы
Профессиональный Документы
Культура Документы
c
Web Forms are the one of best feature of ASP.NET. Web Forms are the User Interface (UI)
elements that give your Web applications their look and feel. Web Forms are similar to Windows
Forms in that they provide properties, methods,and events for the controls that are placed onto
them.However these UI elements render themselves in the appropriate markup language required
by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the
familiar drag-and-drop interface used to create your UI for your Web application.
c
Web.config file, as it sounds like is a configuration file for the Asp .net web application. An Asp
.net application has one web.config file which keeps the configurations required for the
corresponding application. Web.config file is written in XML with specific tags having specific
meanings.
We have Machine.config file also. As web.config file is used to configure one asp .net web
application, same way Machine.config file is used to configure
the application according to a particular machine. That is, configuration done in machine.config
file is affected on any application that runs on a particular machine. Usually, this file is not
altered and only web.config is used which configuring applications.
4. In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory.
5. In the first screen of the New Virtual Directory Wizard, type an alias, or name, for the virtual
directory (SiteName), and then click Next.
6. In the second screen, click Browse. Locate the content folder that you created to hold the Web
content. Click Next.
7. In the third screen, click to select Read and Run scripts (such as ASP). Make sure that the
other check boxes are cleared. Click Finish to complete the wizard.
SiteCookies["UserName"] = "Pervej";
SiteCookies["sitename"] = "dotnetRed";
SiteCookies= DateTime.Now.AddDays(5);
Response.Cookies.Add(SiteCookies);
siteCookies= DateTime.Now.A
ddDays(-1);
Response.Cookies.AddSiteCookies
1 bytes = 8 bits
(
An ASP.NET control (sometimes called a server control) is a server-side component that is
shipped with .NET Framework.A server control is a compiled DLL file and cannot be edited. It
can, however, be manipulated through its public properties at design-time or runtime. It is
possible to build a custom server control (sometimes called a customcontrol or composite
control). (We will build these in part 2 of this article).
In contrast, a user cotrol will consist of previously built server controls (called constituent
controls when used within a user control). It has an interface that can be completely edited and
changed. It can be manipulated at design-time and runtime via properties that you are responsible
for creating. While there will be a multitude of controls for every possible function built by third-
party vendors for ASP.NET, they will exist in the form of compiled server controls, as
mentioned above. Custom server controls may be the .NET answer to ActiveX Web controls.
//In Page_Load
Response.Write(ts.TotalDays.ToString () + "
");
A thread is just a unit for that unit processor time is being allocated by operating system. It is
also possible that there may be more then one thread in single App domain.Every App domain
starts with single thread but can do to multiple domain.There are mainly two types of thread one
is pre-emptive,Non-preemptive thread.
pre-emptive:-In this thread all things done by operating system which to run and which to not.
Non-preemptive:- Here is s equence is quite opposite after one thread is done thread then call to
other thread.
set showplan_text on
Differneces between Single Call & Singleton. Single Call objects service one and only one
request coming in. Single Callobjects are useful in scenarios where the objects are required to do
afinite amount of work. Single Call objects are usually not required tostore state information, and
they cannot hold state information betweenmethod calls. However, Single Call objects can be
configured in aload-balanced fashion.Singleton objects are those objects that service multiple
clients and henceshare data by storing state information between client invocations. Theyare
useful in cases in which data needs to be shared explicitly betweenclients and also in which the
overhead of creating and maintaining objectsis substantial.
Shadowing : Protecting against a subsequent base class modification introducing a member you
have already defined in your derived class
2.Redefined element :
3.Redefining element :
4.Accessibility :
Overriding : Cannot expand the accessibility of overridden element (for example, cannot
override Protected with Public)
6.Keyword usage :
Shadowing : Shadows recommended in derived class;Shadows assumed neither Shadows nor
Overrides specified
Overriding : Overridable required in base class; Overrides required in derived class 7.Inheritance
of redefining element by classes deriving from your derived class : Shadowing : Shadowing
element inherited by further derived classes; shadowed element still hidden Overriding :
Overriding element inherited by further derived classes; overridden element still overridden
Shadowing :-This is VB.Net Concept by which you can provide a new implementation for base
class member without overriding the member. You can shadow a base class member in the
derived class by using the keyword "Shadows". The method signature, access level and return
type of the shadowed member can be completely different than the base class member.
Hiding : - This is a C# Concept by which you can provide a new implementation for the base
class membe
r without overriding the member. You can hide a base class member in the derived class by using
the keyword "new". The method signature,access level and return type of the hidden member has
to be same as the base class member.Comparing the three :- 1) The access level , signature and
the return type can only be changed when you are shadowing with VB.NET. Hiding and
overriding demands the these parameters as same.
2) The difference lies when you call derived class object with a base class variable.In class of
overriding although you assign a derived class object to base class variable it will call derived
class function. In case of shadowing or hiding the base class function will be called
#
Sessions can be managed by two ways in case of webfarms:
1. Using SQL server or any other database for storing sessions regarding current logged in user.
2. Using State Server, as one dedicated server for managing sessions. State Server will run as
service on web server having dotnet installed.
In ASP.NET there is three ways to manage session objects. one support the in-proc mechanism
and other two's support the out-proc machanism.
2) SQL-Server (Out-proc)
$
c
Application Configuration File Values will over ride the values of server configuration file. But
only when we allow override set as True, if we does not allow override then Application
Configuration file variables cannot override the values of server configuration file.
ASP.NET server controls can optionally expose and raise server events, which can be handled by
developers.Developer may accomplish this by declaratively wiring an event to a control (where
the attribute name of an event wireup indicates the event name and the attribute value indicates
the name of a method to call).
Message.Text = "http://www.dotnetquestion.info"
End Sub
where as the client side code executes at client side and displays the result in its browser. it the
client side core consist of certain functions that are to be executed on server then it places request
to the server and the server responses as the result in form of HTML.
33
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.
3
The process of communication between different operating system processes, regardless of
whether they are on the same computer. The .NET remoting system is an architecture designed
to simplify communication between objects living in different application domains, whether on
the same computer or not, and between different contexts, whether in the same application
domain or not.
3
All .NET compilers produce metadata about the types defined in the modules they produce.This
metadata is packaged along with the module (modules in turn are packaged together in
assemblies), and can be accessed by a mechanism called reflection. The System.Reflection
namespace contains classes that can be used to interrogate the types for a module/assembly.
1 - Lengthy Info
3 - Detailed
4 - Full Example
DBCC log(db,4)
Because a readonly field can be initialized either at the declaration or in a constructor, readonly
fields can have different
values depending on the constructor used. A readonly field can also be used for runtime
constants as in the following example public static readonly uint l1 = (uint)DateTime.Now.Ticks
3c
Rapid application development (RAD), is a software development process developed initially by
James Martin in the 1980s.The methodology involves iterative development, the construction of
prototypes, and the use of Computer-aided software engineering (CASE) tools. Traditionally the
rapid application development approach involves compromises in usability,features,& /or
execution speed.Increased speed of development through methods including rapid
prototyping,virtualization of system related routines, the use of CASE tools, and other
techniques. Increased end-user utility Larger emphasis on simplicity and usability of GUI
design.Reduced Scalability, and reduced features when a RAD developed application starts as
prototype and evolves into a finished application Reduced features occur due to time boxing
when features are pushed to later versions in order to finish a release in a short amount of time
if (string.IsNullOrEmpty(queryStringValue))
else
Response.Redirect(url)
Dim firstf
SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 6 salary FROM employee ORDER
BY salary DESC) a ORDER BY salary
sp_columns 'table_name'
SELECT TOP 3 emp_id, emp_name, salary , dept_id FROM employee WHERE dept_id =
training dept ORDER BY salary DESC
(8)Write a query to round up the values of a number. For example even if the user enters 7.1 it
should be rounded up to 8.
SELECT UPPER('test')
Push model is used to insert the element only at the top position in table to database with the help
of object. But when we have to delete the top most record pull method is used over push. Similar
to stack operation
Distributor is a bridge between publisher and the subscriber.Distributor is one who gathers all the
data which is published by publisher and take it before send it to subscriber. So it is clear that it
is bridge between publisher and subscriber and its supports multiple publisher and subscriber
concepts.
Subscri ber is end source or the final place where data has to be transmitted.p
A property is a thing that describes the features of an object. A property is a piece of data
contained within class that has an exposed interface for reading/writing. Looking at that
definition, you might think you could declare a public variable in a class and call it a property.
While this assumption is somewhat valid, the true technical term for a public variable in a class
is a field. The key difference between a field and a property is in the inclus ion of an interface.
We make use of Get and Set keywords while working with properties. We prefix the variables
used within this code block with an underscore. Value is a keyword, that holds the value which is
being retrieved or set.
Get
Return _Color
End Get
Set(ByVal Value)
_Color = Value
End Set
End Property
The ASP.NET 2.0 Callback Manager uses XMLHTTP behind the scenes to encapsulate the
complexities in sending data to and from
the servers and clients. And so, in order for the Callback Manager to work, you need a web
browser that supports XMLHTTP. Microsoft Internet Explorer is, obviously, one of them.
Its basically a syntax error in your ASPX page. It happens when your page is unreadable for the
part of ASP.NET that transforms your code into an executa
Using the Session_Start and Session_End Events
Application("UserCount") = Application("UserCount") + 1
End Sub
Application("UserCount") = Application("UserCount") - 1
End Sub
End Sub
e.g.
Adp.Fill("Select * from Table1;Select * from Table2;Select * from Table3",DS)
, "+
MSIL supports OO programming, so we can have a class which has public and private methods.
The entry point of the program needs to be specified. In fact it doesn't really matter whether the
method is called Mam or Dad. The only thing that matters here is that .entrypoint is specified
inside method. MSIL programs are compiled with ilasm compiler. Since we are writing a
managed assembly code, we have to make sure that no variables are allocated in memory when
the program goes out of scope. Here is a more complicated program that, once again, does not do
anything but has some dataThe sample MSIL program.method static void main(){ .entrypoint
.maxstack 1 ldstr "Hello world!" call void [mscorlib]System.Console::WriteLine(string) ret}.
(3)Attaching databases
(4)Replication
(5) DTS
6)BCP
(7)logshipping
(8) INSERT...SELECT
(9)SELECT...INTO
+1 4
p
p ppp!
p+"p+!p+pp
p+!p+pp+++.+"p+!p/p
p"p
pp0++.0
p+!p+/p
p
p!pppp ppppppp
pppppp
pp
p1+pp pp
#
ppp"p#
p
string encode=Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(ss));
Response.Write(encode);
(1)Expression blend support is available in Visual 2008. Its a XAML generator tool for
silverlight application.We can install expression blend as an embedded plug-in in Visual Studio
2008.
for games developers. currently this game development kits are available for C++ and also
2D/3D Dark Matter one image and sounds sets. (4)One of most useful feature of .net3.5 is we
can able to create,run,debug .NET 2.0, .NET 3.0, .NET 3.5 application. We can also deploy
.NET 2.0 application in machine where .NET 2.0 is not installed.
(5)In previous version we have to make a seprate setup of AJAx Control library but in Visual
2008 there is a built-in AJAX Contrl library.
(6)One of most good feature is that now we can debug Javascript we can set a break point in
javascript.
(7)In VS 2008 you can even edit the nested master pages.
(9)VS 205 has a feature show both design and source code in single window. but both the
windows tiles horizontally.
(10)In VS 2008 we can create, debug and deploy the silverlight applications.
There are several other reasons why you might want to use interfaces instead of class
inheritance:
p Interfaces are better suited to situations in which your applications require many possibly
unrelated object types to provide certain functionality.
p Interfaces are more flexible than base classes because you can define a single
implementation that can implement multiple interfaces.
p Interfaces are better in situations in which you do not need to inherit implementation
from a base class.
p Interfaces are useful in cases where you cannot use class inheritance. For example,
structures cannot inherit from classes, but they can implement interfaces.
if ((!Page.IsStartupScriptRegistered("clientScript")))
{
Page.RegisterStartupScript("clientScript", strScript);
}p
,
The .NET framework includes a managed heap that all .NET languages use when allocating
reference type objects. Lightweight objects known as value types are always allocated on the
stack, but all instances of classes and arrays are created from a pool of memory known as the
managed heap.
,
As web.config file is used to configure one asp .net web application, same way Machine.config
file is used to configure application according to a particular machine. That is, configuration
done in machine.config file is affected on any application that runs on a particular machine.
Usually, this file is not altered and only web.config is used which configuring applications.
++$
A livelock is one, where a request for an exclusive lock is repeatedly denied because a series of
overlapping shared locks keeps interfering. SQL Server detects the situation after four denials
and refuses further shared locks. A livelock also occurs when read transactions monopolize a
table or page, forcing a write transaction to wait indefinitely.
ransport Layer Security (TLS), to have a more secure connection Bind - authenticate and specify
LDAP protocol version
Delete an entry
Modify an entry
The GUI is the "top layer".It contains all things that are visible to user, the 'outside' of the
system, such as screen layout and navigation. The GUI layer has techniques like HTML, CSS,
Applet, Servlet, JSP, JHTML.
This is the core of the system, the linking pin between the other layers. The object layer has
knowledge, in two different ways: runtime values, like the custome r name "Oxford &
Associates" or the invoice number "OAA2000w36".Structural knowledge, about data and
processing.
Data example
A customer can receive many invoices, and an invoice always goes to just one customer. Proces
example :- Know who does what. Every objects knows his own methods, and those of his
neighbours. In a pure OO model an object talks to his neighbours, and nobody but his
neighbours. In the object layer you'll find things like Classes,objects, instance variables, vectors,
primitives, methods, polymorphism, encapsulation and inheritance. The objects mostly have a
temporary nature. They "live" just in memory for the duration of a transaction or session.
Database Layer
The database layer takes care of persistency. An object from the object layer can write itself to
one or more tables. In the database layer you'll find things like database, connection, table, SQL
and result set.
(1)Low
(2)Medium
(3)High
(1)Low(IIS Process):-In this all the main process of IIS and ASP.NET application runs in the
same process . But here is some disadvantage of this if one of process is failed whole the process
failed.Its required low resources as compare to other.
(2)Medium(Pooled):-In this IIS process and application runs in different process.Let there are
two proces
s process1 and process2 then in process one IIS process is running and in process2 application is
run.
(3)High(Isolated):-In this all the process running in there own process. One process for one
application.But it is one costly things because too much memory needed for this.
Read uncommitted (the lowest level where transactions are isolated only enough to ensure that
physically corrupt data is not read).
Repeatable read.
Serializable (the highest level, where transactions are completely isolated from one another).
Read Committed -
SQL Server applied a share lock while reading a row into a cursor but frees the lock immediately
after reading the row. Because a shared lock request is blocked by an exclusive lock, a cursor is
prevented from reading a row that another task has updated but not yet committed. Read commi
tted is the default isolation level setting for both SQL Server and ODBC.
Read Uncommitted -
When no locks while reading a row into a cursor and honors no exclusive locks. Cursors can be
populated with values that have already been updated but not yet committed. The user is
bypassing all of SQL Serverÿs locking transaction control mechanisms.
SQL Server requests a shared lock on each row as it is read into the cursor as in READ
COMMITTED, but if the cursor is opened within a transaction, the shared locks are held until
the end of the transaction instead of being freed after the row is read. This has the same effect as
specifying HOLDLOCK on a SELECT statement.
syntax:-
isNull("dotnet","SQL")
object :means when memory location is associated with the object( is a runtime entity of the
class) by using the new operator
interface is a set of abstract methods, all of which have to be overriden by the class whichever
implements the interface
abstract class is a collection of data and methods which are abstact (not all of them)
a new object is created, and values is saved in that. The temp object is im mutable, and can't be
changed. An object qualifies as being called immutable if its value cannot be modified once it
has been created. For example, methods that appear to modify a String actually return a new
String containing the modification. Developers are modifying strings all the time in their code.
This may appear to the developer as mutable - but it is not. What actually happens is your string
variable/object has been changed to reference a new string value containing the results of your
new string value. For this very reason .NET has the System.Text.StringBuilder class. If you find
it necessary to modify the actual contents of a string-like object heavily, such as in a for or
foreach loop, use the System.Text.StringBuilder class.
A:active { text-decoration: none } --- active is for link appearance while you're clicking
here is syntax only first frame is display and left two are hidden.With the help of frame we can
get data of more then one field.