2

Is there a way to pass int array as a parameter to web user control. I found the same question in SO which was asked in 2008, so the person who asked was probably using .net 3.5 or something and the answer was not convincing Passing int array as parameter in web user control. I am using .net 4.0. Is there a way to do it in the new version?

I want something like

<user:control id="mycontrol" runat="server" myarray="1,2,3" />

or from code behind

mycontrol.myarray = arr; //where arr is int array

Community
  • 1
  • 1
user1
  • 1,063
  • 1
  • 8
  • 28

1 Answers1

0

You will be able to do it from the code behind but I don't think it's possible to specify arrays from the markup. Just declare a property of array type in the user control declaration and make sure it's public.

Ted
  • 3,985
  • 1
  • 20
  • 33