Passing int list as a parameter to a web user control

前端 未结 8 1532
失恋的感觉
失恋的感觉 2020-12-14 04:15

I want to pass an int list (List) as a declarative property to a web user control like this:


         


        
8条回答
  •  庸人自扰
    2020-12-14 04:51

    I solved something simular by creating 2 properties:

    public List ModuleIDs { get .... set ... }
    public string ModuleIDstring { get ... set ... }
    

    The ModuleIDstring converts its value set to a list and sets the ModuleIDs property.

    This will also make the ModuleIDs usable from a PropertyGrid etc.

    Ok, not the best, typesafe solution, but for me it works.

提交回复
热议问题