MetaBuilders.ComboBox compile with Visual Studio 2005

I am using  MetaBuilders.ComboBox[^] (see my previos posts here and here) and now compiled it with VS 2005.New compiler is more strict .

It showed couple compiler errors “Cannot access protected member 'System.Web.UI.WebControls.WebControl.WebControl()' via a qualifier of type 'System.Web.UI.WebControls.WebControl'; the qualifier must be of type 'MetaBuilders.WebControls.ComboBox' (or derived from it)“ for code lines
container = new WebControl(); and
button = new WebControl();

Fortunately the fix is simple -  add HtmlTextWriterTag.Span parameter as the following:

container = new WebControl(HtmlTextWriterTag.Span);

button = new WebControl(HtmlTextWriterTag.Span);

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
«March»
SunMonTueWedThuFriSat
2627281234
567891011
12131415161718
19202122232425
2627282930311
2345678