hockman

Stories submitted by hockman

XmlTextWriter.WriteStartElement for RootElement and overriding namespa(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 4 months ago

Hi there, I'm having some problems with the XMLTextWriter. On MSDN it says: Namespace Declaration Overriding with the XmlTextWriter The following code example shows how to manually override the namespace associated with a given prefix. Notice that the order value overrides the original namespace URI of 123. This allows the namespace to be redefined in a new element scope. Visual Basic w.WriteStartElement("x", "node", "123") w.WriteAttributeString("xmlns", "x", Nothing, "order") C# w.WriteStartElement("x","node","123"); w.WriteAttributeString("xmlns","x",null,"order"); So I used the following construction for the root element: lXmlWriter.WriteStartElement("MyPrefix", "RootElement", null); read more...

add a comment |category: |Views: 10

tags: another

Sitecore PublishItemProcessor and no current HttpContext(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 4 months ago

Hi there, As some of you know Sitecore 6 has a new pipeline called the publishItem pipeline. A pipeline for publishing Sitecore items. Christopher Wojciech already talked about it here. As already descibed in the web.config all you have to do is the following: <publishItem help=“Processors should derive from Sitecore.Publishing.Pipelines.PublishItem.PublishItemProcessor“> First: Configure an entry in the web.config: 3 <sitecore> 4 <pipelines> 5 <publishItem> 6 <processor type="Hockblogs.Pipelines.MyOwnCoolPublisher, Hockblogs.Pipelines"/> 7 </publishItem> Next: implement the custom processer. This is what you'll do when implementing it: read more...

add a comment |category: |Views: 41

tags: another

Handy snippet for Sitecore CMS - Part 5 - Getting items from a Treelis(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 6 months ago

Hi there, In my previous post, you could get the items from a tree list field. In this post, we'll get them in another way: Sitecore.Data.Items.Item item = Sitecore.Context.Item; Sitecore.Data.Fields.MultilistField multilistField = item.Fields["TreeListField"]; Sitecore.Data.Items.Item[] items = multilistField.GetItems(); Hope this is usefull! read more...

add a comment |category: |Views: 19

tags: another

Handy Snippet for Sitecore CMS - Part 4 - Getting items from a Treelis(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 6 months ago

Hi there, Part 4 of my handy snippets section. This time, getting the items from a Treelist. Sitecore.Data.Items.Item item = Sitecore.Context.Item; Sitecore.Data.ID[] ids = Sitecore.Data.ID.ParseArray(item["TreelistField"], false); foreach (ID id in ids) { Item target = Sitecore.Context.Database.GetItem(id); // Do something with the id.... } read more...

add a comment |category: |Views: 14

tags: another

Handy snippet for Sitecore - Part 3(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 6 months ago

Hi there, Part 3 of my handy snippets contribution. This time: getting the startitem: Sitecore.Data.Items.ItemUtil.GetItemFromPartialPath(Sitecore.Context.Site.StartItem, Sitecore.Context.Database); Hope this is usefull! gr, Robbert read more...

add a comment |category: |Views: 5

tags: another

Handy snippet for Sitecore CMS - part 2(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 6 months ago

Hi there, This is my second 'handy snippet post' when developing Sitecore CMS websites. You'll use the following snippet, when hard-coding a sublayout (UserControl) on another UserControl (Sublayout) read more...

add a comment |category: |Views: 11

tags: another

Handy snippets for Sitecore CMS(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 6 months ago

Hi there, I'll be posting some handy snippets in the next blog posts, you'll often use when developing Sitecore CMS websites. This snippet is for dynamically rendering a UserControl inside a placeholder. read more...

add a comment |category: |Views: 21

tags: another

Bing Maps Silverlight control 1.0 released and handy links(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 6 months ago

Hi there, Yeah, It's now official. At TechEd Europe, the Bing Maps team released version 1.0 of the official Bing Maps Silverlight Control! This is a replacement for the previous Virtual Earth Javascript control and provides a great DeepZoom experience for using the mapping platform.&... read more...

add a comment |category: |Views: 6

tags: another

How cool is sketchflow in Expression Blend 3(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 9 months ago

Hi there, Recently I've started with sketchflow in Expression Blend 3. And....how cool is that tool! It's really easy to create a prototype design! For more information on Sketchflow: SketchFlow: From Concept to Production SketchFlow overview here's a design by the way of an application I'm trying to develop: read more...

add a comment |category: |Views: 27

tags: another

Windows 7 Installation - Part 2: Windows Easy Transfer(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 9 months ago

Hi there, Yesterday I wrote about the Windows Upgrade Advisor. Today I'll be blogging about the Windows Easy transfer. This is the second step in the process of moving on from Windows XP to Windows 7. Here are the screenshots of my Windows Easy Transfer: read more...

add a comment |category: |Views: 11

tags: another

Windows 7 Installation - Part 1: Windows 7 upgrade advisor(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 9 months ago

Hi there, Yesterday I have run the Windows 7 Upgrade Advisor on my Windows XP laptop. The noticable thing is that Microsoft Visual Studio .NET 2008 needs additional installation after an upgrade and I should also update certain drivers after a Windows 7 installation. Real soon I'll be moving over from Windows XP to Windows 7. But first: Backup your data, which I'll be covering tomorrow how to do that. read more...

add a comment |category: |Views: 5

tags: another

Expression Studio 3 available on MSDN Subscriber Downloads and install(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 9 months ago

Hi there, About two weeks ago, Microsoft expanded availability for Expression Studio to all MSDN Premium subscribers with the release of Expression 3 on MSDN Subscriber Downloads. Previously, only subscribers at the Visual Studio Team System Team Suite with MSDN Premium level have been able to download Expression Studio, while all other MSDN Premium subscribers (e.g., Visual Studio Professional with MSDN Premium, Visual Studio Team System Development Edition with MSDN Premium, etc.) only had access to Expression Web and Expression Blend. I've installed it myself and here you will find some screenshots of the installation: read more...

add a comment |category: |Views: 9

tags: another

Review of elearning clinic Introducing WPF using .Net Framework 3.5 (hockblogs.net)

submitted by hockmanhockman(505) 2 years, 10 months ago

Hi there, Last weekend, I started the two hour clinic: Clinic 6263: Introducing Windows Presentation Foundation using .Net Framework 3.5 & Visual Studio 2008 from the Microsoft eLearning site. It’s a free clinic, so if your new to WPF, it’s well worth a study. It’s a self-paced course and took me actually some more time than two hours, since I had to make notes for this review on things I found interesting to talk about. And a couple of hours for me writing this post tonight and finishing the clinic. Anyway, you will learn about Windows Presentation Foundation, the new platform for building Smart Client applications that integrate UI, media and documents to deliver unparalleled user experiences. This clinic will provide a start point for Smart Client developers and Software Architects that are looking to Windows Presentation Foundation for providing rich user interfaces within their solutions. In this post I’ll review the clinic: read more...

add a comment |category: |Views: 17

tags: another

Getting started JQuery & Visual Studio .NET 2008 intellisense problem(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 11 months ago

Hi there, Today at work, I found out something weird about the JQuery intellisense feature in Visual Studio 2008. For 99% of the developers out there you won't have a problem, but for the 1% of plugin developers, you have! But he! There's at least a workaround! Tongue out So first: To enable intellisense completion for jQuery within VS you'll want to follow three steps (According to Scott Guthrie and Guy Burnstein) and my other step, to setup your project: Step 1: Install VS 2008 SP1 VS 2008 SP1 adds richer JavaScript intellisense support to Visual Studio, and adds code completion support for a broad range of JavaScript libraries. Step 2: Install VS 2008 Patch KB958502 to Support "-vsdoc.js" Intellisense Files Last year Microsoft shipped a patch that you can apply to VS 2008 SP1 and VWD 2008 Express SP1 that causes Visual Studio to check for the presence of an optional "-vsdoc.js" file when a JavaScript library is referenced, and if present to use this to drive the JavaScript intellisense engine. These annotated "-vsdoc.js" files can include XML comments that provide help documentation for JavaScript methods, as well as additional code intellisense hints for dynamic JavaScript signatures that cannot automatically be inferred. You can download it for free here. Step 3: Download the jQuery-vsdoc.js file You can download both jQuery and the jQuery-vsdoc file from the official download page on t read more...

add a comment |category: |Views: 23

tags: another

StringDictionary class adds the key as lower-cased(hockblogs.net)

submitted by hockmanhockman(505) 2 years, 11 months ago

Hi there, In a project I'm currently developing, we used the StringDictionary (In the System.Collections.Specialized namespace) class frequently for stored key value pairs. I noticed that all my keys were lower-cased. So when checking out the Add method with Reflector, I found out that the key is lower-cased. public virtual void Add(string key, string value) { if (key == null) { throw new ArgumentNullException("key"); } this.contents.Add(key.ToLower(CultureInfo.InvariantCulture), value); } As described on MSDN: The key is handled in a case-insensitive manner; it is translated to lowercase before it is used with the string dictionary. So if you want to use a string as a key and want that key string representation exactly to the same as you stored it, that use the following: // Use the Dictionary<string, string> instead of the StringDictionary, since StringDictionary stores it's key as case-insensitive Dictionary<string, string> items = new Dictionary<string, string>(); Nothing fancy, all standard .NET functionality, but this post is written as a reminder for myself and for you as a visitor of my blog. Hope this is usefull! gr, Robbert read more...

add a comment |category: |Views: 5

tags: another

LINQ and Lightspeed, some oddities...(hockblogs.net)

submitted by hockmanhockman(505) 3 years ago

Hi there, I'm currently developing an ASP.NET (actually rewriting a PHP website) website, and since my provider doensn't support SQL Express, I had to use MySQL (could have used SQLLite ofcourse, but I went with MySQL). I found this really cool ORM tool, called Lightspeed. Since I don't have have that many tables in my simple website, I can use the free edition. So following the tutorial, I create a new LightspeedContext. LightSpeedContext<ModelUnitOfWork> db = new LightSpeedContext<ModelUnitOfWork>(); List<Picture> pictures = new List<Picture>(); using (var unitOfWork = db.CreateUnitOfWork()) { var pics= unitOfWork.Pictures.Select(p => new Picture() {Name = string.Format("/book/photo/{0}.jpg", p.Name), Description= p.Description ?? string.Empty}); } pictures.AddRange(pics); read more...

add a comment |category: |Views: 24

tags: another