Geeks With Blogs
Gaurav Taneja Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in. .Net
Check & Kill Process
private void CheckExcellProcesses()Proce... AllProcesses = Process.GetProcessesByName(... Hashtable();int iCount = 0;foreach (Process ExcelProcess in AllProcesses)private void KillExcel()Process[] AllProcesses = Process.GetProcessesByName(... check to kill the right process { ExcelProcess.Kill(); } AllProcesses = } foreach (Process ExcelProcess in AllProcesses)if (myHashtable.ContainsKey(Ex... == false)null; { myHashtable = { myHashtable.Add(ExcelProces... iCount); ......

Posted On Monday, June 29, 2009 5:36 AM

URL rewrtting
UrlRewriting is one of the interesting and advance topics in ASP.Net, following is the link shows the comprehensive information on URLRewriting. Scott has give a fantastic detailed article on URL Rewriting. here http://weblogs.asp.net/scot... http://msdn.microsoft.com/a... The following link is the example with source code available http://urlrewriting.net/en/... ......

Posted On Thursday, April 17, 2008 7:02 PM

Failed to access IIS metabase problem
Possible Cause:- When you install IIS AFTER .NET 2.0 framework, the rights of the ASPNET user had not been set correctly. Resolution Repair (Uninstall if repair does not work for you) .NET Framework 2.0 Simply run the following from command line to reset the IIS registry settings for aspnet user. Usually framework directory for .Net Framework 2.0 resides under C:\WINDOWS\Microsoft.NET\Fr... ......

Posted On Thursday, April 17, 2008 7:01 PM

Fix for Sys.WebForms.PageRequestManagerParserErrorException + Ajax
Well while implementing Ajax i had received error due to Sys.WebForms.PageRequestMan... the best solution that i could figure out to over come is catch this exception and byPass it.. if any body has a good way of catching this exception why this arise Please do let me know. i has to modify the script <script type="text/javascript"> Sys.WebForms.PageRequestMan... (sender, args) { if (args.get_error()!=null) { if (args.get_error().name ......

Posted On Wednesday, April 16, 2008 10:50 PM

Iterating through controls in form + vb.net
Looop through the controls... Private SetTooltip(oControl, strToolTip) FindToolTipControl(oControl... strToolTip) Sub FindToolTipControl(ByVal oControlCollection As ControlCollection, ByVal strToolTip As String)For Each oControl As Control In oControlCollectionNext ...................... Private Sub SetTooltip(ByVal oControl As Control, ByVal strToolTip As String)Select Case oControl.GetType.ToStringCase "System.Web.UI.WebControls.... Response.Write( Dim otxt As TextBox = oControl.FindControl(oContr... ......

Posted On Monday, August 4, 2008 5:23 AM

Checks Image Exist at an URL
public static bool CheckImageExist(string strImageURL) { bool blnImageExist = true; System.Net.HttpWebRequest httpImageRequest = null; System.Net.HttpWebResponse httpImageResponse = null; // Sends the HttpWebRequest and waits for the response. try { httpImageRequest = (System.Net.HttpWebRequest)... httpImageResponse = (System.Net.HttpWebResponse... } catch (Exception ex) { blnImageExist = false; } return blnImageExist; } ......

Posted On Sunday, April 6, 2008 10:30 PM

WrapCharacters
WrapCharacters public static string WrapCharacters(object objstr, int intNum) { if (objstr == System.DBNull.Value) { return ""; } string str = (string)objstr; int intLen = str.Length / intNum; int intInsertedChars = 0; if (intLen < 1) { return str; } int intStartIndex = 0; if (str.IndexOf(" ", 0) < intNum && str.IndexOf(" ", 0) != -1) { intStartIndex = str.IndexOf(" ", 0) + 1; intLen = str.Length - intStartIndex; intLen = intLen / intNum; } for (int intCount = 0; intCount < intLen; ......

Posted On Sunday, April 6, 2008 10:27 PM

Encrypts the string to a byte array using the MD5 Encryption Algorithm + C#
Encrypts th string to a byte array using the MD5 Encryption Algorithm public static string MD5Encryption(string strToEncrypt) { string strEnctypted = string.Empty; // Create instance of the crypto provider. MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); // Create a Byte array to store the encryption to return. byte[] hashedbytes; // Required UTF8 Encoding used to encode the input value to a usable state. UTF8Encoding textencoder = new UTF8Encoding(); // let the show begin. hashedbytes ......

Posted On Sunday, April 6, 2008 10:27 PM

Paging in Datalist + custom Paging + .Net
Here is an Example using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Text; using System.IO; using System.Net; using System.Web.UI.WebControls; using System.Web.UI.WebControls.W... using System.Web.UI.HtmlControls; public partial class ProfileApproval_PhotoGaller... : System.Web.UI.Page { // variables decleration ApprovalUserDetailsBAL objUserDetailBAL = null; string strUserType ......

Posted On Wednesday, April 2, 2008 10:18 PM

Getting IIS Virtual Directories
using System; using System.Collections.Speciali... using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.DirectoryServices; namespace SearchIIS { /// <summary> /// Summary description for iissearch. /// </summary> public class iissearch : System.Web.UI.Page { protected System.Web.UI.WebControls.L... lst_iisdir; private ......

Posted On Tuesday, April 3, 2007 12:00 PM

Copyright © Gaurav Taneja | Powered by: GeeksWithBlogs.net