Software Blog

Posted under: Web Development

If you need to ensure that the RadPanelBar control (which I use for sidebar navigation) remains expanded, check out the RadPanelbar1_ItemDataBound method in the control located at /Sitefinity/UserControls/Navigation35/SitePanelBar.ascx.

This control checks the hideUrlForGroupPages, removing the link if set to true on your control. However, this doesn't prevent the link from being active, collapsing the nodes when clicked. I need my menu to be fully expanded, so I modified the code using some newly discovered properties in the e (RadPanelEventArgs) parameter:

public void  RadPanelbar1_ItemDataBound(object  sender,  RadPanelBarEventArgs  e)
{
     if  (!hideUrlForGroupPages)  return;

     var  node = e.Item.DataItem  as  CmsSiteMapNode;
     if  (node ...
Full story

Posted under: Web Development

One of the recent features added to Sitefinity that I've recently begun making use of is the Viddler video integration. However, the module itself stands alone, and I was in need of a way to link the individual videos to specific news stories, and vice-versa.

Fortunately, after spending some time with my favorite tool Reflector and a whole lot of debugging, this was accomplished with a minimal amount of trouble. Here's how it's done!

Add Metafield

First, you need to add a new Metafield to the News Module which will store the Guid for the video. Add the following line ...

Full story

Posted under: Web Development

In case you are using some of the Custom Index Providers I blogged about previously, you may encounter some errors when upgrading to the new Sitefinity 3.6 SP1 that was released this week.

The problem is that the IIndexerInfo interface how requires a new method, ResolveIndexPath(). Since the Sitefinity team is still catching up on documentation, I didn't know what exactly this is used for. Fortunately, with the use of Reflector, it turns out that this simply returns the Path property.

public string  ResolveIndexPath()
{
     return  Path;
}

Actually, this method is also supposed to take into account culture information, modifying ...

Full story

Posted under: Web Development

This post is for anyone who is encountering the following errors in their asp.net applications:

  • The server tag 'asp:ScriptManager' is ambiguous. Please modify the associated registration that is causing ambiguity and pick a new tag prefix.
  • The base class includes the field 'ScriptManager1', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager).

There are many instances where you might exprience this problem. For me, the situation was that we had a virtual directory running asp.net 2.0 with AJAX extensions, while the root site is running asp.net 3.5. The subdirectory was attempting to reference the old 1.0.61025.0 ...

Full story

Posted under: General Programming

While developing an online form, I came upon the need to insert two copies the results to a database, one for each of two options selected on the form. The only thing different between these entries would be this option, and of course, the autogenerated ID for the row's primary key.

While I could simply call the Insert function of the TableAdapter twice, this method requires that each field be explicitly submitted as a parameter, and since the data is coming from textboxes, and there are about a dozen boxes on the page, that's a whole lot of textbox.Text.Trim() arguments!...

Full story