skip to main |
skip to sidebar
You can exit using the following 2 static methods,
1. Environment.Exit(returnval)
2. Application.Exit()
www.codecollege.NET
it is used to apply range checking to an operation.
www.codecollege.NET
using Perfmon.exe application.
www.codecollege.NET
//c#
[Obsolete("Call NewMethod instead")]
void OldMethod()
{
}
www.codecollege.NET
//c#
[CLSCompliant(false)]
public void MyMethod(0
{
}
www.codecollege.NET
'VB
//C#
[assembly: CLSCompliant(true)>
www.codecollege.NET
ExceptionManager.Publish(ex);
www.codecollege.NET
Application.Run(new Form1());
www.codecollege.NET
string mystr;
if (String.IsNullOrEmpty(mystr))
www.codecollege.NET
To view trace details for a specific request
1.Goto to Trace.axd in the root of your application.
For ex: if the URL for your application is http://localhost/myApplication, Goto http://localhost/myApplication/trace.axd to view the trace information for that application.
2.Select the View Details link for the specific request that you want to investigate.
www.codecollege.NET
1. Open the command window in Visual Studio
2. Type “immed” To Execute statements
www.codecollege.NET
Enclose Methods and Interfaces in #region blocks so that it can be collapsed or expanded.
www.codecollege.NET
You can find that using the following code (which detects whether it is IE)
if(Page.Request.Browser.Browser=="IE")
{
}
www.codecollege.NET
Add the following line of code to the Post build event in the project properties,
call copy $(ProjectDir)$(OutDir) c:\test\
www.codecollege.NET
Previous page's information is stored in a property called PreviousPage and you can access it using the following code,
Page prePage = this.PreviousPage;
Label totalEmployees = prePage.FindControl("lblTotEmployees");
Response.Write(totalEmployees.Text);
www.codecollege.NET
You can call the ASP.NET control from Javascript using the document.getElementById method.
Ex:
Let txtEmployeeName be a Textbox, then
var tEmp = document.getElementById('<%=txtEmployeeName.ClientID%>');
www.codecollege.NET
You can use as an alternate to Javascript's document.getElementByid(), the following ASP.NET AJAX's method,
$get('nameofcontrol')
Ex:
var myctrl = $get('lblTotal')
www.codecollege.NET