Tutorials and Interviews
We are the Group of Webxperts in .net technology
Tuesday, December 23, 2025
Sunday, December 4, 2011
Explain the different parts that constitute ASP.NET application.
Content, program logic and configuration file constitute an ASP.NET application.
Content files
Content files include static text, images and can include elements from database.
Program logic
Program logic files exist as DLL file on the server that responds to the user actions.
Configuration file
Configuration file offers various settings that determine how the application runs on the server.
Explain the advantages of ASP.NET.
Following are the advantages of ASP.NET.
Web application exists in compiled form on the server so the execution speed is faster as
compared to the interpreted scripts.
ASP.NET makes development simpler and easier to maintain with an event-driven, server-side
programming model.
Being part of .Framework, it has access to all the features of .Net Framework.
Content and program logic are separated which reduces the inconveniences of program
maintenance.
ASP.NET makes for easy deployment. There is no need to register components because the
configuration information is built-in.
To develop program logic, a developer can choose to write their code in more than 25 .Net
languages including VB.Net, C#, JScript.Net etc.
Introduction of view state helps in maintaining state of the controls automatically between the
postbacks events.
ASP.NET offers built-in security features through windows authentication or other authentication
methods.
Integrated with ADO.NET.
Built-in caching features.
Explain how a web application works.
A web application resides in the server and serves the clients requests over internet. The client
access the web page using browser from his machine. When a client makes a request, it receives
the result in the form of HTML which are interpreted and displayed by the browser.
A web application on the server side runs under the management of Microsoft Internet
Information Services (IIS). IIS passes the request received from client to the application. The
application returns the requested result in the form of HTML to IIS, which in turn, sends the result
to the client.
Saturday, September 17, 2011
Parse Integer
public class Test
public Shared Sub Main
Try
Dim num_items As Integer = Integer.Parse("123")
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End class
public Shared Sub Main
Try
Dim num_items As Integer = Integer.Parse("123")
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End class
MinValue and MaxValue of Integer
public class Test
public Shared Sub Main
Dim iNum As Integer
Console.WriteLine("Integer: " & iNum.MinValue & " to " & iNum.MaxValue)
End Sub
End class
public Shared Sub Main
Dim iNum As Integer
Console.WriteLine("Integer: " & iNum.MinValue & " to " & iNum.MaxValue)
End Sub
End class
Swap two integers without using a third
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Collections
Public Class Tester
Public Shared Sub Main
Dim firstValue As Integer
Dim secondValue As Integer
firstValue = 17
secondValue = 123
Console.WriteLine("Before swap: {0}, {1}",firstValue, secondValue)
firstValue = firstValue Xor secondValue
secondValue = firstValue Xor secondValue
firstValue = firstValue Xor secondValue
Console.WriteLine("After swap: {0}, {1}",firstValue, secondValue)
End Sub
End Class
Imports System.Drawing.Drawing2D
Imports System.Collections
Public Class Tester
Public Shared Sub Main
Dim firstValue As Integer
Dim secondValue As Integer
firstValue = 17
secondValue = 123
Console.WriteLine("Before swap: {0}, {1}",firstValue, secondValue)
firstValue = firstValue Xor secondValue
secondValue = firstValue Xor secondValue
firstValue = firstValue Xor secondValue
Console.WriteLine("After swap: {0}, {1}",firstValue, secondValue)
End Sub
End Class
Subscribe to:
Comments (Atom)
-
Module Tester Sub Main () Dim firstNumber, secondNumber As String Dim number1, number2, sumOfNumbers As Intege...
-
Option Explicit Off Module Module1 Sub Main () EmployeeName = "Buddy Jamsa" EmployeePhoneNumber = ...
-
Module Module1 Sub Main () Dim AnInt As Integer = 5 Dim ALong As Long = 7 ALong = AnInt 'ca...