IGNOU BCA MCA Students - VIVA Question Answer for .NET
.NET with C# Selected Question Answer - PART IV
Ques 1) What
is ASP.NET?
Ans) ASP.NET is a specification developed by
Microsoft to create dynamic Web applications, Web sites, and Web services. It
is a part of .NET Framework. You can create ASP.NET applications in most of the
.NET compatible languages, such as Visual Basic, C#, and J#. The ASP.NET
compiles the Web pages and provides much better performance than scripting
languages, such as VBScript. The Web Forms support to create powerful
forms-based Web pages. You can use ASP.NET Web server controls to create
interactive Web applications. With the help of Web server controls, you can
easily create a Web application.
Ques 2) What
is the basic difference between ASP and ASP.NET?
Ans) The basic difference between ASP and ASP.NET
is that ASP is interpreted; whereas, ASP.NET is compiled. This implies that
since ASP uses VBScript; therefore, when an ASP page is executed, it is
interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and
VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).
Ques 3) In which event are the
controls fully loaded?
Ans) Page load event guarantees that all controls
are fully loaded. Controls are also accessed in Page_Init events
but you will see that view state is not fully loaded during this event.
Ques 4) How can we identify that the Page is Post
Back?
Ans) Page object has an "IsPostBack" property, which can be checked to know that is the page
posted back.
IsPostBack
Postback is actually
sending all the information from client to web server, then web server process
all those contents and returns back to the client. Most of the time ASP control
will cause a post back (e. g. buttonclick) but some don't unless you tell them
to do In certain events ( Listbox Index Changed,RadioButton Checked etc..) in
an ASP.NET page upon which a PostBack might be needed.
IsPostBack is a property of
the Asp.Net page that tells whether or not the page is on its initial load or
if a user has perform a button on your web page that has caused the page to
post back to itself. The value of the Page.IsPostBack property will be set to
true when the page is executing after a postback, and false otherwise. We can
check the value of this property based on the value and we can populate the
controls on the page.
Is Postback is normally
used on page _load event to detect if the web page is getting generated due to
postback requested by a control on the page or if the page is getting loaded
for the first time.
C# Source Code
protected void Page_Load(object sender,
EventArgs e)
{
if
(!IsPostBack)
{
// generate form;
}
else
{
//process submitted data;
}
}
No comments:
Post a Comment