Browse by Tags

Related Posts

  • Using Regex to return the first N words in a string

    Jeff Perrin needed a function to return the first N words in a string (to create a small summary or a snippet thingy). He did it using the manual and awkward method of parsing the string manually. That method is more error prone and usually makes for less readable code. Fortunately, you can use regular...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 01-07-2005, 12:00 AM
    Filed under: .Net Original, Tips & Tricks, Regex
  • Manage many events easily with EventHandlerList

    There were many little snippets and corners during Juval's class that simply made my day every time. This is one of those. What happens when you have a class that exposes many events (such as the "Button" or "Control" class that exposes "Click","Focus" etc..)? In the standard case you would have to have...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 12-31-2004, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • Problem and solution: Renaming htm file to aspx may cause javascript trouble

    We ran across this when moving some old files to a new project. One of the tasks was to turn a very simple htm file into the same file with an aspx extension. The original htm file had a reference to a javascript file. The trouble was that the new aspx file would not respond to the javascript events...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 12-20-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • Document outline

    For the past few weeks I've been deep diving into ASP.Net land. One of the things I wasn't prepared for was the amount of time I would have to spend tweaking and changing HTML and Java Scripts. A lot. Lots of times I found myself lost in the sea of HTML and scripts, until I found a very cool feature...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 09-11-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • Disabling Connection Pooling

    ADO.NET Data Providers automatically use connection pooling turned on. If you want to turn this functionality off: In an SQLConnection object, Add this to the connection string: Pooling=False; In An OLEDBConnection object, add this: OLE DB Services=-4; This way, the OLE DB data provider will mark your...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 06-23-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • A Little Macro To Automate Creating Connection Strings

    I've created a little macro that automatically creates a connection string and inserts it in your code. It pops up the infamous " Data Links " dialog for you, saving you, the poor programmer, from having to remember all those pesky little syntax details.... :) No references needed for this. Thank god...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 06-23-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • UI Threading - A Very Simple Solution

    God loves the simple solutions. It turns out that there is a really simple solution to the problem of working with UI threads.Much simpler then mine . I was given this simple pattern by a guy on the win_tech_off_topic list. Here it is: "I've read your article, and there is a simple pattern for multi...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 05-20-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • How Access 2003 Helped Me Out

    Kudos to MSFT for the latest installation of Office. Overall, Office 2003 beta is one great product. Outlook , being the main attraction for me for office use, is much more usable then it was before, with numerous usability enhancements. There are a lot of new goodies to play with in all the office applications...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 05-08-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • More VS.NET Tips & Tricks

    For you keyboard junkies out there: Cut the current line - CTRL+L (Saves you that 'long' HOME,SHIFT+END,CTRL+X) Delete the current line - CTRL+SHIFT+L (Saves you that 'long' HOME,SHIFT+END,DEL) Move to the closing or opening of the current block - CTRL+[ Here's a nice little macro to turn your selection...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 05-01-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
  • A VS.NET 2003 Registry Tweaker Don Could Use

    Since Don was writing on how you can tweak the registry in order to be able to ShellExecute VS.NET associated files into an open instance of VS.NET(instead of a new one each time), I decided to take the 'challenge' and came up with this: Download source files - 74 Kb Download demo project - 8 Kb "Introduction...
    Posted to ISerializable - Roy Osherove's Blog (Weblog) by RoyOsherove on 04-30-2003, 12:00 AM
    Filed under: .Net Original, Tips & Tricks
Page 1 of 2 (15 items) 1 2 Next >
Microsoft Communities