Feeds:
Posts
Comments

Archive for February, 2009

> 1.Count_big always returns the Bingint values…but count returns theint values 2.Both count the No of Rows in a table Water for Elephants21

Read Full Post »

>#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 [...]

Read Full Post »

> 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);

Read Full Post »

>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 [...]

Read Full Post »

>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”;

Read Full Post »

>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 [...]

Read Full Post »

>DirectoryInfo di = new DirectoryInfo(“c:\\accounts”); FileInfo[] fArr = di.GetFiles(“??A??.txt”); for (int iCounter = 0 ; iCounter iCounter++) { string str = fArr[iCounter].Name; } For the above Example i am loading the group of files from the directory of “C:\\\accounts” with the file third letter of “A” di.GetFiles(“A??.txt”); For the above Example i am loading the [...]

Read Full Post »

>private string RandomString(int size, bool lowerCase){StringBuilder builder = new StringBuilder();Random random = new Random();char ch ;for(int i=0; i{ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;builder.Append(ch);}if(lowerCase)return builder.ToString().ToLower();return builder.ToString();}

Read Full Post »

>User Controls are semi-autonomous pages of HTML and underlying ASP.NET code that can be inserted into ASP.NET pages. As such they are useful for adding blocks of functionality to pages. Typical uses are to use User Controls for page headers and footers. They can also add functionality such as a “property of the week” for [...]

Read Full Post »

>#region Creating Cookies HttpCookie JayaCookie = Request.Cookies["CookieExample"]; if (HttpContext.Current.Request.Cookies["CookieExample"].Value == null) { HttpContext.Current.Response.Cookies["CookieExample"].Value = Session.SessionID; HttpContext.Current.Response.Cookies["CookieExample"].Expires = DateTime.Now.AddYears(30); } #endregion For the above Example the cookie name is “CookieExample”.I assigned the SessionID value to the cookie

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.