Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
26Activity
0 of .
Results for:
No results containing your search query
P. 1
ASP.Net FAQ

ASP.Net FAQ

Ratings:

5.0

(1)
|Views: 756|Likes:
Published by api-3704121

More info:

Published by: api-3704121 on Oct 14, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

BASIC ASP.NET FAQ\u2019s (2)
2.1 What is ASP.NET?
ASP.NET is a programming framework built on the common language runtime that can be used on a server to build
powerful Web applications.
For more details refer
\u2022
What is ASP.NET
\u2022
ASP.NET Overview
2.2 Why does my ASP.NET file have multiple <form> tag with runat=server?

This means that ASP.Net is not properly registered with IIS.
.Net framework provides an Administration utility that manages the installation and uninstallation of multiple
versions of ASP.NET on a single machine. You can find the file in
C:\WINNT\Microsoft.NET\Framework\v**\aspnet_regiis.exe

use the command: aspnet_regiis.exe -u ---> to uninstall current asp.net version.
use the command: aspnet_regiis.exe -i ---> to install current asp.net version.
For Windows Server 2003, you must use aspnet_regiis -i -enable
This is because of the "Web Service Extensions" feature in IIS 6
(if you install VS.NET or the framework without IIS installed, and then go back in and install IIS afterwards, you
have to re-register so that ASP.NET 'hooks' into IIS properly."
2.3 How to find out what version of ASP.NET I am using on my machine?
VB.NET
Response.Write(System.Environment.Version.ToString() )
C#
Response.Write(System.Environment.Version.ToString() );
2.4 Is it possible to pass a querystring from an .asp page to aspx page?
Yes you can pass querystring from .asp to ASP.NET page .asp
<%response.redirect "webform1.aspx?id=11"%>
.aspx
VB.NET
Response.Write (Request("id").ToString ())
C#
Response.Write (Request["id"].ToString ());
2.5 How to comment out ASP.NET Tags?
<%--<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 48px"
runat="server">Label</asp:Label>--%>
2.6 What is a ViewState?

In classic ASP, when a form is submitted the form values are cleared. In some cases the form is submitted with huge information. In such cases if the server comes back with error, one has to re-enter correct information in the form. But submitting clears up all form values. This happens as the site does not maintain any state (ViewState).

In ASP .NET, when the form is submitted the form reappears in the browser with all form values. This is because
ASP .NET maintains your ViewState. ViewState is a state management technique built in ASP.NET. Its purpose is to
keep the state of controls during subsequent postbacks by the same user. The ViewState indicates the status of the
page when submitted to the server. The status is defined through a hidden field placed on each page with a <form
runat="server"> control.

<input type="hidden" name="__VIEWSTATE"
value="dDwyNTA3OTU0NDM7Oz7t5TntzkOUeB0QVV6FT2hvQwtpPw==" />

If you want to NOT maintain the ViewState, include the directive <%@ Page EnableViewState="false"%> at
the top of an .aspx page If you do not want to maintain Viewstate for any control add the attribute
EnableViewState="false" to any control. For more details refer The ASP.NET View State

2.7 Where can I get the details on Migration of existing projects using various
technologies to ASP.NET?

Microsoft has designed Migration Assistants to help us convert existing pages and applications to ASP.NET. It does
not make the conversion process completely automatic, but it will speed up project by automating some of the steps
required for migration.
Below are the Code Migration Assistants

\u2022
ASP to ASP.NET Migration Assistant
\u2022
PHP to ASP.NET Migration Assistant
\u2022
JSP to ASP.NET Migration Assistant
Refer Migrating to ASP.Net
2.8 What is the equivalent of date() and time() in ASP.NET?
VB.NET
System.DateTime.Now.ToShortDateString()
System.DateTime.Now.ToShortTimeString()
C#
System.DateTime.Now.ToShortDateString();
System.DateTime.Now.ToShortTimeString();
2.9 How to prevent a button from validating it's form?
Set the CauseValidation property of the button control to False
2.10 How to get the IP address of the host accessing my site?
VB.NET

Activity (26)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Kumar Anupam liked this
muthurammuthu liked this
alexandergsam liked this
rahulmathur24 liked this
eramitpatni liked this
vr_uth liked this
balajismith liked this
archanasingh88 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->