A form is used to pass information from a web browser to
a web server.There are two different ways that a form can be submitted from
your browser to the webserver. In HTML, this is how one would define the
opening form tags for both submission methods: <form
method="GET"> and <form method="POST">.
If a "GET" request is used, the form parameters
are encoded in the URL in what is called a query string.
www.example.com/?login=usetricks@email.com&password=xxyz
In the GET request above, you can see that the form
parameters (login and password) are attached to the end of the URL itself.
A POST request, unlike a GET request, passes the form
parameters in the body of the HTTP request, not in the URL.
Here i am showing the Comparison chart between GET and POST
methods
GET
Method ():
1.form parameters is appended to the URL.
2.Data is not secret it is public.
3.It is a single call system
4.GET is less secure compared to POST because data sent
is part of the URL. So it's saved in browser history and server logs in
plaintext.
5.GET method is visible to everyone (it will be displayed
in the browser's address bar) and has limits on the amount of information to
send.
6.7607 character maximum size.
7.Can be cached.
POST
Method ():
1.form parameters is not appended to the URL.Post Method
passes the form parameters in the body of the HTTP request, not in the URL.
2.Data is secret it is not public in post method.
3.It is a two call system .
4.POST is a little safer than GET because the parameters
are not stored in browser history or in web server logs.
5.POST method variables are not displayed in the URL.
6.8 Mb max size for the POST method.
7.Can not be cached.
Definition -
What does .NET Framework (.NET) mean?
The .NET
framework is a software development framework from Microsoft. It provides a
controlled programming environment where software can be developed, installed
and executed on Windows-based operating systems.
NET
Framework is a complete environment that allows developers to develop, run, and
deploy the following applications:
1-Console
applications
2-Windows
Forms applications
3-Windows
Presentation Foundation (WPF) applications
4-Web
applications (ASP.NET applications)
5-Web services
6-Windows
services
7-Service-oriented
applications using Windows Communication Foundation (WCF)
8-Workflow-enabled
applications using Windows Workflow Foundation (WF)
The .NET Framework has two main components: the
common language runtime (CLR) and .NET Framework class library. The CLR is the
foundation of the .NET framework and provides a common set of services for
projects that act as building blocks to build up applications across all tiers.
It simplifies development and provides a robust and simplified environment
which provides common services to build application. The .NET framework class
library is a collection of reusable types and exposes features of the runtime.
It contains of a set of classes that is used to access common functionality.
The .NET Framework Interview Questions will give you an insight to the .NET platform.Here i tried to cover the whole .NET Framework Interview Questions which form the basis of an interview and the interviewer asks them to check your familiarity with the platform .
.NET Framework Interview Questions & Latest .net technical interview questions asked by interviewer. The Q&A mentioned over here have been taken from forums, my colleagues.
.NET Framework Interview Questions & Latest .net technical interview questions asked by interviewer. The Q&A mentioned over here have been taken from forums, my colleagues.
All .NET Framework Interview Questions with Answer.
1- What is .NET Framework?
2. What are the main components of .NET Framework?
2. What are the main components of .NET Framework?
3. List the new features added in .NET Framework 4.0.
4. What is an IL?
5. What is Manifest?
6. What are code contracts?
7. Name the classes that are introduced in the System.Numerics namespace.
10. What is Common Type System (CTS)?
Difference between MVC2, MVC3 and MVC4
View Engine :
·
View Engine is responsible for rendering of the HTML code from
your views to the browser.
·
MVC 2 uses only Web Forms view engine (.aspx) as a default View
Engine.
·
MVC3 uses Razor View Engine (.cshtml for c# and .vbhtml for Visual
Basic) and Web Forms view engine (.aspx).
·
MVC4 also uses Razor View Engine as a default view engine with
some new features like condition attribute and ‘Tilde slash’.
Chart, WebGrid, Crypto,WebImage, WebMail Controls :
·
All these are not available in MVC2.
·
All these are available in MVC3 and in MVC4.
Syntex :
·
(HTML Syntax) Web Forms view engine syntax: <%=Html code %>
in MVC2.
·
(Razor Syntax) Razor View Engine syntax: @Html code in MVC3.
·
MVC4 has the same Razor View Engine Syntax but with the addition of
new features like conditional attribute and ‘Tilde Slash’ i.e. URL resolution.
Objects available for sharing of data between View and Controller :
·
TempData, ViewData are available in MVC2.
·
TempData, ViewData ,ViewBag are available in MVC3.
·
TempData, ViewData ,ViewBag are available in MVC4.
·
TempData is used with current and subsequent request i.e. when you
know the next view to be redirected.
·
In ViewData, dictionary of objects are accessible via strings as
keys.
·
ViewBag was added in the C# 4.0 which uses the dynamic feature
that allows to add properties of an object dynamically . We can say that
ViewBag = ViewData + dynamic feature around the ViewData dictionary.
Jquery Support :
·
Jquery support is Good in MVC2.
·
Jquery support is Better in MVC3.
·
MVC4 provides better support for Jquery like Jquery Mobile.
Dependency Injection Support :
·
Dependency injection is Good in MVC2.
·
It provides powerful hooks with Dependency Injection and Global
Action Filters in MVC3.
·
Better support in MVC4.
Layout Support :
·
Supports only Master Page in MVC2.
·
Supports not only Master Page but also Layout Page in MVC 3 and in
MVC4.
Validation :
·
Client-side Validation and Asynchronous controllers is there in
MVC2.
·
Unobtrusive Ajax and Client side Validation, Jquery Validation and
JSON binding support is in MVC3.
·
Client side validation, Jquery validation and enhanced support for
asynchronous methods in MVC4.
Project Templates :
·
MVC3 supports project templates enabled by HTML 5.
·
MVC4 supports many new features for mobile apps and also provides
new mobile project template and default templates are refreshed and modernized.
Is using try catch is good experience in coding practice
here is a detailed answer .
Best practice is that exception handling should never
hide issues. This means that try-catch blocks should be extremely rare.
There are 3 circumstances were using a try-catch makes
sense.
1. Always deal with known exceptions as low-down as you
can. However, if you're expecting an exception it's usually better practice to
test for it first. For instance parse, formatting and arithmetic exceptions are
nearly always better handled by logic checks first, rather than a specific
try-catch.
2. If you need to do something on an exception (for
instance logging or roll back a transaction) then re-throw the exception.
3. Always deal with unknown exceptions as high-up as you
can - the only code that should consume an exception and not re-throw it should
be the UI or public API.
Below is the use of JIT.
1. JIT is a compiler which converts MSIL code to Native
Code (ie.. CPU-specific code that runs on the same computer architecture).
2. Because the common language runtime supplies a JIT
compiler for each supported CPU architecture, developers can write a set of
MSIL that can be JIT-compiled and run on computers with different
architectures.
3. However, your managed code will run only on a specific
operating system if it calls platform-specific native APIs, or a
platform-specific class library.
4. JIT compilation takes into account the fact that some
code might never get called during execution.
5. Rather than using time and memory to convert all the
MSIL in a portable executable (PE) file to native code, it converts the MSIL as
needed during execution and stores the resulting native code so that it is
accessible for subsequent calls.
6. The loader creates and attaches a stub to each of a
type's methods when the type is loaded.
7. On the initial call to the method, the stub passes
control to the JIT compiler, which converts the MSIL for that method into
native code and modifies the stub to direct execution to the location of the
native code.
8. Subsequent calls of the JIT-compiled method proceed
directly to the native code that was previously generated, reducing the time it
takes to JIT-compile and run the code.
1. GUID is Short form of Globally Unique Identifier, a unique 128-bit number that is produced by the Windows OS or by some Windows applications to identify a particular component, application, file, database entry, and/or user.
2. For instance, a Web site may generate a GUID and assign it to a user's browser to record and track the session.
3. A GUID is also used in a Windows registry to identify COM DLLs.
4. Knowing where to look in the registry and having the correct GUID yields a lot information about a COM object (i.e., information in the type library, its physical location, etc.).
5. Windows also identifies user accounts by a username (computer/domain and username) and assigns it a GUID.
6. Some database administrators even will use GUIDs as primary key values in databases.
7. GUIDs can be created in a number of ways, but usually they are a combination of a few unique settings based on specific point in time (e.g., an
IP address, network MAC address, clock date/time, etc.).
Here i am showing how to create a GUID in c#?
2. For instance, a Web site may generate a GUID and assign it to a user's browser to record and track the session.
3. A GUID is also used in a Windows registry to identify COM DLLs.
4. Knowing where to look in the registry and having the correct GUID yields a lot information about a COM object (i.e., information in the type library, its physical location, etc.).
5. Windows also identifies user accounts by a username (computer/domain and username) and assigns it a GUID.
6. Some database administrators even will use GUIDs as primary key values in databases.
7. GUIDs can be created in a number of ways, but usually they are a combination of a few unique settings based on specific point in time (e.g., an
IP address, network MAC address, clock date/time, etc.).
Here i am showing how to create a GUID in c#?
Guid id
= Guid.NewGuid();
Console.WriteLine(id); // Outputs
"8c1d1c4b-df68-454c-bf30-953e5701949f"
you can rename a table in SQL Server 2005,2008 and 2012 by using SQL Server Management Studio or Transact-SQL.
Renaming a table will not automatically rename references to that table. You must manually modify any objects that reference the renamed table. For example, if you rename a table and that table is referenced in a trigger, you must modify the trigger to reflect the new table name.
Here i am describe all the ways to rename a table databse and column.
1-Rename Database:
Renaming a table will not automatically rename references to that table. You must manually modify any objects that reference the renamed table. For example, if you rename a table and that table is referenced in a trigger, you must modify the trigger to reflect the new table name.
Here i am describe all the ways to rename a table databse and column.
1-Rename Database:
1-sp_renameDB 'oldDB','newDB'
2-ALTER DATABASE Test
MODIFY NAME =
NewTest
2-Rename column name
Now, we see how to
change the Column Name the below script will change table column name from “OldName”
to “NewNameChange”
USE yourdatabasename
GO
sp_RENAME 'TableName.OldName', 'NewNameChange' , 'COLUMN'
GO:
GO
sp_RENAME 'TableName.OldName', 'NewNameChange' , 'COLUMN'
GO:
3.Renaming database table to new name.
We can also change the table name too with using the same
command.
sp_RENAME 'oldname', 'newname'GO
To rename a table
- In Object Explorer, right-click the table you want to
rename and choose Design from the shortcut menu.
- From the View menu,
choose Properties.
- In the field for the Name value
in the Properties window, type a new name for the table.
- To cancel this action, press the ESC key before leaving
this field.
- From the File menu
choose Save table
name.
you can rename a database in SQL Server 2005,2008 and 2012 by using SQL Server Management Studio or Transact-SQL.
Here i am describe all the ways to rename a Database .
Rename Database using Transact-SQL.:
Using SQL Server Management Studio To rename a Database:
1-In Object Explorer, right-click the database you want to rename and choose Design from the shortcut menu.
2-From the View menu, choose Properties.
3-In the field for the Name value in the Properties window, type a new name for the database.
4-To cancel this action, press the ESC key before leaving this field.
5-From the File menu choose Save name.
Here i am describe all the ways to rename a Database .
Rename Database using Transact-SQL.:
1-sp_renameDB 'oldDB','newDB'
2-ALTER DATABASE Test
MODIFY NAME =
NewTest
Using SQL Server Management Studio To rename a Database:
1-In Object Explorer, right-click the database you want to rename and choose Design from the shortcut menu.
2-From the View menu, choose Properties.
3-In the field for the Name value in the Properties window, type a new name for the database.
4-To cancel this action, press the ESC key before leaving this field.
5-From the File menu choose Save name.
Here i am showing an example to Insert a date into a textbox and then that date would be selected in the calendar control in asp.net.And also the selected date in calendar will fill in textbox control.
This is .aspx page code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Calender.aspx.cs" Inherits="Calender" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<div>
<asp:Calendar ID="Calendar1" runat="server" Visible="False" OnSelectionChanged="Calendar1_SelectionChanged"></asp:Calendar>
</div>
<asp:TextBox ID="TextBox1"
runat="server"></asp:TextBox>
<asp:LinkButton ID="LinkButton1"
runat="server"
onclick="LinkButton1_Click">PickDate...</asp:LinkButton>
</div>
</form>
</body>
</html>
This is code behind page code
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
public partial class Calender : System.Web.UI.Page
{
protected void Page_Load(object
sender, EventArgs e)
{
}
protected void LinkButton1_Click(object
sender, EventArgs e)
{
Calendar1.Visible = true;
}
protected void Calendar1_SelectionChanged(object sender, EventArgs
e)
{
TextBox1.Text =
Calendar1.SelectedDate.ToLongDateString();
Calendar1.Visible = false;
}
protected void TextBox1_TextChanged(object
sender, EventArgs e)
{
Calendar1.SelectedDate = Convert.ToDateTime(TextBox1.Text);
}
}
In this article i am going to explain How to get/fetch/read current page URL/Address in asp.net using C#.
Here is C#.Net Code to get current page URL/Address in asp.net.
if your page full url is http://example.com/Default.aspx
Here is C#.Net Code to get current page URL/Address in asp.net.
if your page full url is http://example.com/Default.aspx
1-Response.Write(Request.RawUrl);
its output will be : /Default.aspx
2-Response.Write(HttpContext.Current.Request.Url.AbsolutePath);
its output will be : /Default.aspx
3-Response.Write(Request.Url);
its output will be : http://example.com/Default.aspx
4-Response.Write(HttpContext.Current.Request.Url);
its output will be : http://example.com/Default.aspx
5-
Response.Write(Request.Url.AbsoluteUri);
its output will be : http://example.com/Default.aspx
6- Response.Write(HttpContext.Current.Request.Url.AbsoluteUri);
its output will be : http://example.com/Default.aspx
Active Server Pages or Classic ASP, as it is more commonly
known, is Microsoft's first server side scripting engine that enables you to
make dynamic and interactive web pages.
Classic ASP uses server-side scripting to dynamically
produce web pages that are not affected by the type of browser the website
visitor is using.
The default scripting language used for writing ASP is
VBScript, although you can use other scripting languages like JScript
(Microsoft's version of JavaScript).
When a browser requests an ASP Page, the Web server
generates a page with HTML code and sends it back to the browser.Any web pages
containing ASP cannot be run by just simply opening the page in a web browser.
The page must be requested through a web server that supports ASP, this is why
ASP stands for Active Server Pages, no server, no active pages.
This interview section questions contains a brief introduction to the ASP.Net interview Questions in ASP.NET,C#.NET,SQL Server,.NET Framework .NET. The most common question for experience persons .This is Asp.Net Interview Question Part 1.
Here you will get ASP.NET - .NET Interview Questions and Answers.
1. What is ASP?
2. What is ASP.NET?
3. What is the basic difference between ASP and ASP.NET?
4. In which event are the controls fully loaded?
5. How can we identify that the Page is Post Back?
6. What is the lifespan for items stored in ViewState?
7. How information about the user's locale can be accessed?
8. What is the difference between SQL notification and SQL invalidation?
9. Which is the parent class of the Web server control?
10. Can you set which type of comparison you want to perform by the CompareValidator control?
11. What is the behavior of a Web browser when it receives an invalid element?
12. What are the advantages of the code-behind feature?
13. How do you sign out from forms authentication?
14. What is AutoPostBack?
15. What is the function of the ViewState property?
16. Why do you use the App_Code folder in ASP.NET?
17. Define a multilingual Web site.
18. What is an ASP.NET Web Form?
19. What is the difference between a default skin and a named skin?
20. What is IIS? Why is it used?
21. What is Query String? What are its advantages and limitations?
22. What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?
23. How can you display all validation messages in one control?
24. Which two new properties are added in ASP.NET 4.0 Page class?
25. What is tracing? Where is it used?
26. What is the difference between authentication and authorization?
27. How can you register a custom server control to a Web page?
28. Which ASP.NET objects encapsulate the state of the client and the browser?
29. Differentiate globalization and localization.
30. What is ViewState?
31. Which method is used to force all the validation controls to run?
32. Which method has been introduced in ASP.NET 4.0 to redirect a page permanently?
33. How can you send an email message from an ASP.NET Web page?
34. What is the difference between the Response.Write() and Response.Output.Write() methods?
35. What does the Orientation property do in a Menu control?
36. Differentiate between client-side and server-side validations in Web pages.
37. How does a content page differ from a master page?
38. Suppose you want an ASP.NET function (client side) executed on the MouseOver event of a button. Where do you add an event handler?
39. What is the default timeout for a Cookie?
40. What are HTTP handlers in ASP.NET?
41. What are the events that happen when a client requests an ASP.NET page from IIS server?
42. Explain file-based dependency and key-based dependency.
43. How can you implement the postback property of an ASP.NET control?
44. Explain how Cookies work. Give an example of Cookie abuse.
45. Explain login controls.
46. What is the use of PlaceHolder control? Can we see it at runtime?
47. What are the event handlers that can be included in the Global.asax file?
48. What is the difference between page-level caching and fragment caching?
49. Describe the complete lifecycle of a Web page.
50. How can you assign page specific attributes in an ASP.NET application?
51. Which method is used to post a Web page to another Web page?
52. What is a Cookie? Where is it used in ASP.NET?
53. What are Custom User Controls in ASP.NET?
54. What does the .WebPart file do?
55. How can you enable impersonation in the web.config file?
56. How can you identify that the page is PostBack?
57. In which database is the information, such as membership, role management, profile, and Web parts personalization, stored?
58. What is State Management? How many ways are there to maintain a state in .NET?
59. What do you understand by aggregate dependency?
60. How can you ensure that no one has tampered with ViewState in a Web page?
61. What is the difference between adding items into cache through the Add() method and through the Insert() method?
62. Explain the cookie less session and its working.
63.What is a round trip?
64.What are the major built-in objects in ASP.NET?
65.Where should the data validations be performed-at the client side or at the server side and why?
67.Why do we need nested master pages in a Web site?
68.How can you dynamically add user controls to a page?
69.What is the appSettings Section in the web.config file?
70.What type of code, client-side or server-side, is found in a code-behind file of a Web page?
71.To which class a Web form belongs to in the .NET Framework class hierarchy?
72.What does the "EnableViewState" property do? Why do we want it On or Off?
73.Which event determines that all the controls are completely loaded into memory?
74.What is the function of the CustomValidator control?
75.What is Role-based security?
76.Which data type does the RangeValidator control support?
77.What are the HTML server controls in ASP.NET?
78.Where is the ViewState information stored?
79.Why a SiteMapPath control is referred to as breadcrumb or eyebrow navigation control?
80.Where is the ViewState information stored?
81.Which namespaces are necessary to create a localized application?
82. What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control?
83. What is the difference between HTML and Web server controls?
84. Explain the AdRotator Control.
85. What is the difference between absolute expiration and sliding-time expiration?
86. What is the code-behind feature in ASP.NET?
87.How can you check if all the validation controls on a Web page are valid and proper?
88.Explain the validation controls. How many validation controls in ASP.NET 4.0?
89.What is difference between a Label control and a Literal control?
90.How many types of Cookies are available in ASP.NET?
91.What is the use of the Global.asax file?
92.What are the Culture and UICulture values?
93.What is the difference between ASP session and ASP.NET session?
94.Which control will you use to ensure that the values in two different controls match?
95. What is the difference between a page theme and a global theme?
96.What do you mean by a neutral culture?
97.What is the use of the <sessionState> tag in the web.config file?
98.Can you post and access view state in another application?
99.Which method do you use to kill explicitly a users session?
100.Which class is inherited when an ASP.NET server control is added to a Web form?
101.What events are fired when a page loads?
102.Write three common properties of all validation controls.
103.What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
104.What are server-side comments?
105.How do you prevent a validation control from validating data at the client end?
106.What is cross-page posting in ASP.NET?
107.Explain the Application and Session objects in ASP.NET.
108.How will you differentiate a submaster page from a top-level master page?
109.What is the difference between a HyperLink control and a LinkButton control?
110.What are the various ways of authentication techniques in ASP.NET?
111.What are the different ways to send data across pages in ASP.NET?
112.What do you mean by the Web Part controls in ASP.NET?
113.What is the use of web.config? What is the difference between machine.config and web.config?
114.Explain the concept of states in ASP.NET.
Asp.Net Interview Questions,
Answer 1
When you are applying any theme to a page, then by default the Default skin applies to all controls of same type to that page. This skin is default for a control if it does not have SkinID attribute. Suppose you create a default skin for a Calendar control, then the control skin applies to all Calendar controls on pages that use the theme.
But the named skin controls have their SkinID property. It is not applying skin attributes automatically for controls by type, but it facilitates to apply explicitly a named skin to a control by changing the control's SkinID property. It allows you to set different skins for different instances of the same control in an application.
Answer 2
The default skin is applied to all the Web server controls in a Web form, which are of similar type, and it does not provide a Skin ID attribute. The named skin provides a Skin ID attribute and users have to set the Skin ID property to apply it.
Tags:ASP.NET interview questions and answers Interview Questions in ASP.NET,C#.NET,SQL Server,.NET.
SharePoint 2010 Tutorials For Beginners Lession 1
This beginner tutorial explains how to log into SharePoint, add new sites, edit themes, and create and edit lists and columns in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lession 2
This beginner tutorial explains how to add Users, add Views, and reviews how to create and edit Lists and Columns in SharePoint 2010.
SharePoint 2010 Tutorials Lession 2 Part-A
SharePoint 2010 Tutorials Lession 2 Part-B
SharePoint 2010 Tutorials For Beginners Lession 3
This beginner tutorial explains how to create and use Document Libraries and how to use Versioning and Check-In/Check-Out.
SharePoint 2010 Tutorials Lession 3 Part-A
SharePoint 2010 Tutorials Lession 3 Part-B
SharePoint 2010 Tutorials For Beginners Lession 4 : Introduction to Web Parts
This beginner turorial is a guide to creating and using Web Parts in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lession 5 : Introduction to SharePoint Roles, Groups, and Permissions
This beginner tutorial explains basic user security including authorization and authentication, permissions, active directory, groups, and inheritance in SharePoint 2010.
SharePoint 2010 Lesson 5 - Part A - SharePoint Roles, Groups, and Permissions
SharePoint 2010 Lesson 5 - Part B - SharePoint Roles, Groups, and Permissions -This beginner tutorial explains basic user security including authorization and authentication, permissions, active directory, groups, and inheritance in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lesson 6 - Document Management - Site Columns
This tutorial discusses what site column definitions are and how to use them in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lesson 7 - Document Management - Content Types
This tutorial discusses content types and information management in SharePoint 2010.
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial