Ambigous matches

  1. #1

    Ambigous matches

    Some of your Library Names in Code result in Ambigous matches. Like Listitem or else. This is not a big problem but its also pretty annoying.

    Greetings

    Das Phansom
  2. #2

    RE: Ambigous matches




    Try not to import the namespace globally? I haven't ran into this yet.
  3. #3

    RE: Ambigous matches

    There are only a handful of Toolkit controls with the same name as standard asp.net webcontrol and I find I rarely have conflicts. If I do it's simple to prefix namespace one or the other. And, it's only an issue with the server-side code.

    You can also alias the objects as the following sample demonstrates.

    Example

    using System;
    using Coolite.Ext.Web;
    using Button = Coolite.Ext.Web.Button;
    using Panel = Coolite.Ext.Web.Panel;
    
    namespace Coolite.Sandbox.Temp.Window
    {
        public partial class WebForm1 : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                Button button = new Button();
                Panel panel = new Panel();
    
                System.Web.UI.WebControls.Panel panel2 = new System.Web.UI.WebControls.Panel();
            }
        }
    }
    And, it's never a problem if you don't import the System.Web.UI.WebControls namespace. ;)

    Hope this helps.

    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 0
    Last Post: Feb 28, 2012, 2:15 PM
  2. Replies: 3
    Last Post: Dec 21, 2011, 8:40 AM
  3. Replies: 4
    Last Post: Sep 08, 2011, 5:56 PM
  4. Replies: 1
    Last Post: May 18, 2010, 10:53 PM

Posting Permissions