Tubes or Tubeless?

by Paul Smith June 09, 2009 16:26

I have been running tubeless wheels for over a year now and until last weekend I'd never had a puncture, well not one that wouldn't seal itself. I was strangely gutted about the whole situation, I had been ranting how tubeless was the end of punctures as we know it and here I was being proved wrong!

So what went wrong? Well coming down a rather fast rocky descent in the Lake District I had launched off a pile of rocks and as I landed I managed to slice a nobble of my rear tyre. This was a slice too much for the sealant and the tyre went flat instantly. Not a problem you might be thinking, stick and tube in it and I'll be up and running in no time. However it wasn't quite that easy, firstly you have to get the tubelss tyre off the rim getting up to the eyes in sealant before removing the valve and then trying to patch the tyre so the tube doesn't pop out of the hole. However my Park emergency tyre boot wouldn't stick to the tyre because it was soaked sealant so I had to get a mate to hold the patch while I put the tyre in place in the hope that the part inflated tyre would hold it in place. Thankfully it did and I was up and running but not after the reputation of tubless tyres was dented for the spectators. A normal puncture would be fixed in minutes, this took considerably longer.

So is it worth the effort? Well given that I'd gone so long without a flat I reckon so but it's going to be harder convincing everyone else now!

My rear Kenda Nevegal UST isn't the most rubust tubeless tyre and this might have played a part in the problem, if I'd had the Schwalbe Nobby Nic UST on the rear like I do up front I'm not so sure the tyre would have sliced the way it did.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Mountain Biking

SQL Server Management Studio Error - Unable to cast COM object....

by Paul Smith February 20, 2009 15:11

Ever had this error before in SQL Server Management Studio?

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)

Well it had me stumped for a while. I found this forum post on MSDN but following the suggested fix of re-registering actxprxt.dll didn’t work for me. However my chance I just thought I’d try unregistering it first and hey presto it worked. So if you have the same problem run regsvr32.exe –r actxprxy.dll first before registering it again.

Strange!!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

SQL Server

Get ASP.NET Report Viewer to Occupy 100% Height and Width - Crossbrowser!!

by Paul Smith January 07, 2009 11:57

If like me you've been pulling your hair out trying to get the Report Viewer to fill page and then got it to work in IE but then broke it in Firefox. Then I think I've found a solution, and it was quite simple. Add your report view to the page...

   1: <rsweb:ReportViewer 
   2:     ID="ReportViewer1" 
   3:     runat="server" 
   4:     Width="100%"
   5:     Height="100%"
   6:     ProcessingMode="Remote">
   7:     <ServerReport 
   8:         ReportServerUrl="http://cc-dev02/reportserver" />
   9: </rsweb:ReportViewer>

Then add the following CSS...

   1: <style type="text/css">
   2: html, body, form
   3: {
   4:     width: 100%;
   5:     height: 100%;
   6:     margin:0;
   7:     padding:0;
   8: }
   9:  
  10: body
  11: {
  12:     overflow-y:hidden;
  13: }
  14:  
  15: table#ReportViewer1
  16: {
  17:     display:table !important;
  18: }</style>

You'll also need to remove the DOCTYPE to get it working in IE so it operates in quirks mode. I've not as yet found any problems removing this yet but I'm sure they'll arise!

Currently rated 4.0 by 4 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

ASP.NET

How to integrate Peter Blum's validation controls into the ASP.NET wizard.

by Paul Smith October 16, 2008 12:38

I came across an interesting problem recently when trying to take advantage of Peter Blum's excellent validation controls. Since the standard ASP.NET Wizard control uses standard button controls none of Peters Validation controls fire, unless you use one of his button controls or use his NativeControlExtender.

One option available is to define navigation templates for your Wizard but this can be a pain if you have several Wizards across your site. I wanted my own control that did all the validation and I wanted to add a validation group at the same time. So I created a control that inherited the standard wizard control

   1: using System;
   2: using System.Web.UI;
   3: using System.Web.UI.WebControls;
   4: using System.ComponentModel;
   5:  
   6: namespace Lib
   7: {
   8:     [ToolboxData("<{0}:CustomWizard runat=server></{0}:CustomWizard>")]
   9:     public class CustomWizard : Wizard
  10:     {
  11:     }
  12: }

First step was to add a property to hold the validation group

   1: [Description("The validation group of the next/previous buttons")]
   2: public string ValidationGroup
   3: {
   4:     get
   5:     {
   6:         object o = ViewState["ValidationGroup"];
   7:         return (o == null) ? string.Empty : (string)o;
   8:     }
   9:     set
  10:     {
  11:         ViewState["ValidationGroup"] = value;
  12:     }
  13: }

Then I need to find the buttons within the Wizard add a NativeControlExtender and assign the button to it, then set the validation group on each. Finding the buttons was a bit of pain and it's not the prettiest code (I'll tidy it up when I get the chance). Note the lines of code that make the appropriate button visible, this is important as the client side code will not render unless the control is visible.

   1: protected override void OnLoad(EventArgs e)
   2: {
   3:     Table table = (Table)this.Controls[0];
   4:     int x = 0;
   5:     
   6:     // The navigation buttons are in the last table row...
   7:     foreach (Control control in table.Rows[table.Rows.Count - 1].Cells[0].Controls)
   8:     {
   9:         // Each of the navigation containers is a table
  10:         // There'll be a prettier way of doing this.
  11:         if (control.Controls[0] is Table)
  12:         {
  13:             Table t = (Table)control.Controls[0];
  14:  
  15:             // The buttons exist in the table cells
  16:             foreach (TableCell cell in t.Rows[0].Cells)
  17:             {
  18:                 // There is a button of each type LinkButton/Button/ImageButton
  19:                 foreach (IButtonControl ctrl in cell.Controls)
  20:                 {
  21:                     // Add a validation group to the button
  22:                     ctrl.ValidationGroup = this.ValidationGroup;
  23:  
  24:                     if (ctrl is LinkButton)
  25:                     {
  26:                         // The button you want to use must be visible at this stage for the client side
  27:                         // script to get rendered. The wizard itself doesn't make them visible until the render method.
  28:                         ((Control)ctrl).Visible = true;
  29:  
  30:                         // Create a native control extender and assign the button as the control to extend
  31:                         PeterBlum.DES.NativeControlExtender nce = new PeterBlum.DES.NativeControlExtender();
  32:                         nce.ID = this.ID + "_" + (ctrl as Control).ID + x.ToString() + "_NCE";
  33:                         nce.ControlToExtend = (Control)ctrl;
  34:                         nce.Group = this.ValidationGroup;
  35:  
  36:                         // Add the NativeControlExtender to the Wizard, can't use this.Conrols.Add() as the
  37:                         // wizard does not allow it's controls collection to be modified. So I just added them 
  38:                         // in the first row as they don't render any HTML
  39:                         table.Rows[0].Cells[0].Controls.Add(nce);
  40:  
  41:                         x++;
  42:                     }
  43:                 }
  44:             }
  45:         }
  46:     }
  47: }

That handles the client side validation the final step was to add code to handle server side validation. That was a pretty straight forward affair.

   1: protected override void OnNextButtonClick(WizardNavigationEventArgs e)
   2: {
   3:     this.Page.Validate(this.ValidationGroup);
   4:     PeterBlum.DES.Globals.Page.Validate(this.ValidationGroup);
   5:  
   6:     if (!this.Page.IsValid && !PeterBlum.DES.Globals.Page.IsValid)
   7:     {
   8:         e.Cancel = true;
   9:         return;
  10:     }
  11:  
  12:     base.OnNextButtonClick(e);
  13: }
  14:  
  15: protected override void OnFinishButtonClick(WizardNavigationEventArgs e)
  16: {
  17:     this.Page.Validate(this.ValidationGroup);
  18:     PeterBlum.DES.Globals.Page.Validate(this.ValidationGroup);
  19:  
  20:     if (!Page.IsValid && !PeterBlum.DES.Globals.Page.IsValid)
  21:     {
  22:         e.Cancel = true;
  23:         return;
  24:     }
  25:  
  26:     base.OnFinishButtonClick(e);
  27: }

Putting it all together you have a custom Wizard that will handle validation groups and Peter Blum's validation control is a relatively tidy manner.

Thanks to Peter Blum for his excellent support.

Download the code for this post: CustomWizard.zip (596.00 bytes)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

ASP.NET

Quick Data Binding to an Enumeration

by Paul Smith October 02, 2008 12:05

I recently got tired of writing the same code (below) to bind enumeration values to a control in ASP.NET.

   1: foreach (int value in Enum.GetValues(typeof(EnumName)))
   2: {
   3:     string name = Enum.GetName(typeof(EnumName), value);
   4:     li = new ListItem();
   5:     li.Text = name;
   6:     li.Value = value.ToString();
   7:     ListControl.Items.Add(li);
   8: }

So I decided to write a quick helper class to deal with sort of operation. Returning it as a DataTable made the most sense since it we easy to modify the headings for two-way data binding. Anyway I've posted the code below

   1: public class EnumUtilities<T> where T : struct
   2:     {
   3:         static EnumUtilities()
   4:         {
   5:             if (!typeof(T).IsEnum)
   6:             {
   7:                 throw new ArgumentException("Parameter T must be of type Enum");
   8:             }
   9:         }
  10:  
  11:         /// <summary>
  12:         /// Returns the Enumeration as a DataTable
  13:         /// </summary>
  14:         /// <param name="valueHeader">The name of the columns that contains the enumeration value</param>
  15:         /// <param name="textHeader">The name of the columns that contains the enumeration text</param>
  16:         public static DataTable GetAsDataTable(string valueHeader, string textHeader)
  17:         {
  18:             DataTable dt = new DataTable();
  19:  
  20:             dt.Columns.Add(valueHeader, typeof(int));
  21:             dt.Columns.Add(textHeader, typeof(string));
  22:  
  23:             foreach (int val in Enum.GetValues(typeof(T))) 
  24:             {
  25:                 dt.Rows.Add(new object[] { val, GetName(val) });
  26:             }
  27:  
  28:             return dt;
  29:         }
  30:  
  31:         /// <summary>
  32:         /// Parses a string to it's enumeration equivalent
  33:         /// </summary>
  34:         /// <param name="memberName"></param>
  36:         public static T Parse(string memberName)
  37:         {
  38:             return (T)Enum.Parse(typeof(T), memberName);
  39:         }
  40:  
  41:         /// <summary>
  42:         /// Gets the text value of an enumeration value from it's integer value
  43:         /// </summary>
  44:         /// <param name="value"></param>
  45:         /// <returns></returns>
  46:         public static string GetName(int value)
  47:         {
  48:             return Enum.GetName(typeof(T), value);
  49:         }
  50:     }

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

ASP.NET | C#

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen | Modified by Mooglegiant

RecentComments

Comment RSS