StatCounter

View My Stats

Saturday, February 14, 2009

Difference b/w COUNT_BIG and COUNT in SQL server

Difference b/w COUNT_BIG and COUNT in SQL server


1.Count_big always returns the Bingint values...but count returns the
int values


2.Both count the No of Rows in a table



To Create Custom exception in C#.Net

To Create Custom exception in C#.Net

#region Custom Exception Classes
class ExTask : Exception
{
public ExTask()
{ }

public ExTask(string message)
: base(message)
{ }
}
#endregion

==================================================================
To catch the custom Exception :

catch (ExTask ex)
{
// Do to Log Handler
}

==================================================================
For the above example "ExTask" is the custom exception name.

1.your Exception wants to inherit the exception base class.



2.You have to create a default constructor,,,, two method we
wants to call the base class Exception contructor.

To Execute the Remote Machine Process Example To reset the iis of remote machine

To Execute the Remote Machine Process  Example To reset the iis of remote machine


ProcessStartInfo psi = new ProcessStartInfo("iisreset.exe", "RematoreMachineName -stop");
psi.UserName = "RemoteMachineUserName";
psi.Domain = "DomainNameOfRemoteMachine";
psi.UseShellExecute = false;
string password = "RemoteMachinePassword";
System.Security.SecureString o = new System.Security.SecureString();
foreach (char c in password)
{
o.AppendChar(c);
}
psi.Password = o;
Process.Start(psi);

Information about W3wp.exe File

Information about W3wp.exe  File


Description: File w3wp.exe is located in a subfolder of C:\Windows\System32 or sometimes in a subfolder of "C:\Program Files". Known file sizes on Windows XP are 7168 bytes (66% of all occurrence), 6656 bytes.
w3wp.exe is a Windows system file. The program has no visible window. w3wp.exe is a trustworthy file from Microsoft. Program listens for or sends data on open ports to LAN or Internet. Therefore the technical security rating is 4% dangerous, however also read the users reviews.

If w3wp.exe is located in the folder C:\Windows\System32 then the security rating is 84% dangerous. File size is 48128 bytes (40% of all occurrence), 57344 bytes, 798208 bytes. There is no information about the maker of the file. The program has no visible window. w3wp.exe is located in the Windows folder, but it is not a Windows core file. w3wp.exe is not a Windows system file. The process listens for or sends data on open ports to LAN or Internet. w3wp.exe is able to hide itself, monitor applications.

How to add double quotes to a string that is inside a variable?

How to add double quotes to a string that is inside a variable?

We can use double quotes on the string.Example :


Declaration:
__________
string a="double quotes Example";

string b= "\""+a+"\"";


The out put is like this:
_________________
a= double quotes Example;

b= " double quotes Example";

Tuesday, February 10, 2009

Region based default button in ASP.NET

Region based default button in ASP.NET

Another one Simple Method is use the Panel inside it put the Default Button Focus To It
<!--


--!>

You can also kept the focus coding at the Form tag itself




If we want to provide the enter key focus based on the particular region we can use panel (or) form tag with "defaultbutton" properties.

Inside the panel you may kept anything else...table,div tag anything whatever u want to


Consider your cursor points to that's location on that if any enter key get fired then the default event focus to the control. For the above example the Button3 click event get fires on the enter key click event.