Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development June 2008 Entries
Store custom objects configuration in separate custom configuration files
We are going to have a windows service that will run a few workflow(WF) instances. I want to have configuration information to be stored in separate config files for each WF instance. I remembered that EntLib has helper classes to store custom objects configuration in separate custom configuration file, but finding good examples in Google wasn't easy(probably I didn't find good search keywords). The links that I finally found(more relevant to the task first) Tom Hollander 'post External configuration ......

Posted On Tuesday, June 10, 2008 12:55 AM

Override ASP.NET Menu javascript functions to delay dynamic menus popup.
We are using asp.net Menu control and wanted to have some delay before sub-menu popup to avoid annoying popup, if user just move mouse through menu area. After some search on Google I found the solution submitted by yupinggang on the thread delaying the menu control. I've slightly modified it( put in a separate JS file,call initMenuMouseHoverInterceptors just in the same file,added handling of the case if no menu on the page etc.) Another possible solution- override PreRender in derived from Menu ......

Posted On Wednesday, June 4, 2008 11:04 AM

Helper String function to TrimLength
/// <summary> /// If lenght of the string is greater than max allowed, remove the end /// </summary> /// <param name="str"></param> /// <param name="maxLength"></pa... /// <returns></returns... public static string TrimLength(string str, int maxLength) { if (str.Length > maxLength) { str = str.Remove(maxLength); } return str; } ......

Posted On Monday, June 2, 2008 1:12 PM

Helper function to Print Page using JScript(including inside frame)
///<summary> /// Helper function to Print Page using JScript(including inside frame) ///</summary> ///<param name="page"></param> public static void PrintPage(Page page) { //In case if page is in frameset, you need to call parent.window.print() String script = @" if (parent!= self) { parent.window.print(); } else { window.print(); } "; RegisterOnceStartupScript(p... MethodBase.GetCurrentMethod... } public static bool RegisterOnceStartupScript(Page ......

Posted On Sunday, June 1, 2008 2:48 PM

Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net | Join free