Wednesday, March 12, 2008

Hiding the Finish Button on an ASP.NET Wizard Control

This is a Class 1 stupid hack. I think it's one of those things where there probably is an easier way to do this, but I haven't found it yet. On an ASP.NET Wizard control, I wanted to hide the Finish button. Here's one way.
myWizard.FinishCompleteButtonType = ButtonType.Link;
myWizard.FinishCompleteButtonText = String.Empty;
myWizard.FinishCompleteButtonStyle.CssClass = "";
myWizard.FinishCompleteButtonStyle.BorderColor = System.Drawing.Color.White;
Another way is to create a CSS class that will hide the button and then assign that to the CssClass property.

No comments: