Tuesday, August 17, 2010

ASP.Net Questions

Can I lock a configuration setting so that a Web.config file that appears lower in the hierarchy cannot override it?
Yes. By setting the location element Override attribute to false, you can lock a specific setting so that it does not inherit settings from below.
How are ASP.Net configuration files secured against unauthorized access?
ASP.Net configures IIS to deny access to any user that requests access to the Machine.config or Web.config files.
Where are the ASP.Net configuration files stored?
System-wide configuration settings and some ASP.NET schema settings are stored in a file named Machine.config, which is located in the %SystemRoot%\Microsoft .NET\Framework\versionNumber\CONFIG directory. This directory also contains other default settings for ASP.NET Web applications in a file that is referred to as the root Web.config file. ASP.NET configuration files for individual Web sites and applications, which are also named Web.config files, can be stored in any Web site root directory, application root directory, application subdirectory, or all of these.
How is ASP.Net configuration data formatted?
ASP.Net configuration data is encoded in XML and stored as plaintext files. You can access these files programmatically by using administration tools or by using a text editor
Do I have to use one programming language for all my Web pages?
No. Each page can be written in a different programming language if you want, even in the same application. If you are creating source code files and putting them in the \Code folder to be compiled at run time, all the code in must be in the same language. However, you can create subfolder in the \Code folder and use the subfolders to store components written in different programming languages.
Are ASP.NET pages XHTML compatible?
Yes. Individual controls render markup that is compatible with the XHTML 1.1 standard. It is up to you, however, to include the appropriate document type declaration and other XHTML document elements. ASP.NET does not insert elements for you to ensure XHTML compatibility.
Which page code model is preferable, single-file or code-behind?
Both models function the same and have the same performance. The choice of using single-file pages versus code-behind pages is one of personal preference and convenience.
Why is there no DataGrid control on the Toolbox?
The DataGrid control has been superseded by the GridView control, which can do everything the DataGrid control does and more. The GridView control features automatic data binding; auto-generation of buttons for selecting, editing, and deleting; automatic sorting; and automatic paging. There is full backward compatibility for the DataGrid control, and pages that use the DataGrid will continue to work as they did in version 1.0 of ASP.Net.
Can I still use the DataList and Repeater controls?
Absolutely. You can use them the way you always have. But note that the controls have been enhanced to be able to interact with data source controls and to use automatic data binding. For example, you can bind a DataList or Repeater control to a SqlDataSource control instead of writing ADO.Net code to access the database.
Can System.Net.Mail read email?
No. System.Net.Mail can only send email. To read email you either need a Mime parsing component such as aspNetMime or a POP3 component such as aspNetPOP3.
What is System.Web.Mail?
System.Web.Mail (SWM) is the .Net namespace used to send email in .Net Framework applications. SWM contains three classes:
MailMessage – used for creating and manipulating the mail message contents.
MailAttachments – used for creating a mail attachment to be added to the mail message.
SmtpMail – used for sending email to the relay mail server.
Note: More information on the System.Web.Mail Namespace can be found on MSDN here:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmail.asp
What is System.Net.Mail?
System.Net.Mail is the namespace used to send email if you are using the .Net 2.0 (or higher) Framework.
How do you turn off cookies for one page in your site?
Use the Cookie.Discard Property which Gets or Sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the hard disk when a session ends.
How do you define the lease of the object?
The lifetime of the server object is determined by the lifetime lease. This is defined by implementing ILease interface when writing the class code.

OR

You can define the lease of the object by implementing the ILease interface at the code time.
What is ASP.Net?
ASP.Net is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.

1. ASP.Net is a Microsoft Technology
2. ASP stands for Active Server Pages
3.ASP.Net is a program that runs inside IIS
4.IIS (Internet Information Services) is Microsofts Internet server


No comments:

Post a Comment