How can I know if the client browser supports active scripting

You can detect and intercept the capabilities of your client using the namespace System.Web.HttpBrowserCapabilities : VB.NET Dim browser As System.Web.HttpBrowserCapabilities = Request.Browser Response.Write(‘Support ActiveXControl: ‘ + browser.ActiveXControls.ToString()) C# System.Web.HttpBrowserCapabilities browser = Request.Browser; Response.Write (‘Support ActiveXControl: ‘ + browser.ActiveXControls.ToString ()); For more details Refer: Detecting Browser Types in Web Forms

How can the default focus can be set when a error occurs?

We can set SetFocusOnError=’true’ for the ASP.NET validators, So that the first control with the validation error will receive the default focus when the form is submitted. First Name: <asp:TextBox ID=’TextBox1′ runat=’server’></asp:TextBox> <asp:RequiredFieldValidator SetFocusOnError=’true’ ErrorMessage=’TextBox1 is empty’ ID=’RequiredFieldValidator1′ ControlToValidate=’TextBox1′ Display=’Dynamic’ runat=’server’>* </asp:RequiredFieldValidator> Last Name: <asp:TextBox ID=’TextBox2′ runat=’server’></asp:TextBox> <asp:RequiredFieldValidator SetFocusOnError=’true’ ErrorMessage=’TextBox2 is empty’ ID=’RequiredFieldValidator2′ ControlToValidate=’TextBox2′ Display=’Dynamic’ runat=’server’>* </asp:RequiredFieldValidator> Here SetFocusOnError is set to true for the validation control, so that the TextBoxes gets focused when it is empty.

Why do I get error message ”Parser Error Message: Access is denied: Source Error: Line xxx : ”

The actual problem is because of the Microsoft Indexing Services which scans the Temporary ASP.NET Files and while doing so, the system puts a lock on the same. To resolve this, the following steps need to be carried out:- Start – Settings – Control Panel – Administrative Tools – Computer management. Expand the services and applications node and select the Indexing service node. Expand the Indexing Service Node and then select and expand the System Node. Right click on Directories and select new directory. browse the path to the temporary asp.net files c:\winnt\microsoft.net\framework\v1.1.4322\. Select the temporary asp.net files. give ok and then select the ‘NO’ in the Include in index radiobutton. give ok and then stop and start the indexing service.

How can we programmatically verify whether the UserName and Password is Correct?

The programmatic verification of username and password can be done by the below code by the Login1_Authenticate method protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { if((Login1.UserName==’User’)&&(Login1.Password==’Password’)) { Label1.Text=’LogIn Successful’; } else { Label1.Text=’LogIn Failed – Try Again’; } }

What is the difference between Response.Redirect() and Server.Transfer().

Response.Redirect Transfers the page control to the other page, in other words it sends the request to the other page. Causes the client to navigate to the page you are redirecting to. In http terms it sends a 302 response to the client, and the client goes where it’s told. Server.Transfer Only transfers the execution to another page and during this you will see the URL of the old page since only execution is transferred to new page and not control. Occurs entirely on the server, no action is needed by the client Sometimes for performance reasons, the server method is more desirable