Thursday, July 23, 2009

Deanna Martin 1970-2009


Deanna Martin

HAVERHILL - Deanna (Dee) Lee Martin, 38, of Bradford, died Thursday, July 23, 2009 at the home of her mother in Auburn N.H. after a courageous eight-year battle with leukemia.

She was born Jan. 21, 1971 in Lowell. Dee graduated from Timberlane High Sschool in 1990. She was a volunteer for the past several years for the Haverhill Meals on Wheels, serving as a driver, delivering meals to shut-ins.

She was an active member of the Danville Baptist Church who loved camping and spending time with her family. Dee was a very special woman whose positive attitude and faith were an inspiration for all who met her.






Beloved baby sister


Tuesday, May 26, 2009

Open an App using a Registered URL

I found this code snip at Christina's site and found it works well with any registered URL, including those custom URL Protocols that you may register .

string url = @"http://www.ricklafleur.com"; 
Process.Start("rundll32.exe", "url.dll,FileProtocolHandler \"" + url + "\""); 

Thursday, May 14, 2009

Register Application as a Url Protocol

There are times when it is appropriate for a desktop application to be called via a URL and be passed data, such as "myprotocol://open?id=100”. The following code shows how an application can self register itself to handle a URL protocol.

public void RegisterUrlProtocol(string myUrlProtocolName, bool force,) 
RegistryKey rKey = Registry.ClassesRoot.OpenSubKey(myUrlProtocolName, true); 
if (force || rKey == null) 
rKey = Registry.ClassesRoot.CreateSubKey(myUrlProtocolName); 
rKey.SetValue("", "URL:"+ myUrlProtocolName+" Protocol"); 
rKey.SetValue("URL Protocol", ""); 
rKey = rKey.CreateSubKey(@"shell\open\command"); 
rKey.SetValue("", "\"" + Application.ExecutablePath + "\" %1"); 
if (rKey != null) { rKey.Close(); 
} 

Tuesday, November 25, 2008

Setting the Style for div via C#.NET

Had to look this up again so documenting for quick reference. It's rather simple to set a div style using the following steps:

Step 1; The div must have a unique id and be configured with runat="server":
 <div id="myDivId" runat="server" class="head2"> 

Step 2; The code behind references the div as if it were any other Control on the page, using the Controls Style property to set a style attribute:
 myDivId.Style["background-color"] = "#ffdd77"; 

Tuesday, November 4, 2008

Setting the property for div in a ContentPlaceHolder

Following shows how to set the property for a div that is in a C#.NET ContentPlaceHolder found with Master Pages:

Step 1; in the aspx file, the div needs a unqiue id and set to runat="server":

 <asp:Content ID="conent1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div id="myDivId" runat="server" style="display: block;"> <p>foo bar</p> </div> </asp:Content> 

Step 2; In the aspx.cs file, the ContentPlaceHolderId is retrieved first using the Page.Master.FindControl and then used to reference the div:

 ContentPlaceHolder content = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1"); content.FindControl("myDivId").Visible = false;