I was not able to find any sections in NEC that prohibit switches from being installed in closets, so until somebody can point to a specific section I'd say it's not a problem. There may be adaptations to the code in your local area, so you'll have to check with the local Electrical Inspector to be absolutely sure.
The NEC does, however, have a section on luminaires in clothes closets.
NEC 2011
410.16 Luminaires in Clothes Closets.
(A) Luminaire Types Permitted. Listed luminaires of the following types shall be permitted to be installed in a closet:
(1) A surface-mounted or recessed incandescent luminaire with a
completely enclosed lamp
(2) A surface-mounted or recessed fluorescent luminaire
(3) Surface-mounted fluorescent or LED luminaires identified as
suitable for installation within the storage area
(B) Luminaire Types Not Permitted. Incandescent luminaires with
open or partially enclosed lamps and pendant luminaires or lampholders
shall not be permitted.
(C) Location. The minimum clearance between luminaires installed in clothes closets and the nearest point of a storage space shall be
as follows:
(1) 300 mm (12 in.) for surface-mounted incandescent or LED luminaires
with a completely enclosed light source installed on the wall above
the door or on the ceiling
(2) 150 mm (6 in.) for surface-mounted fluorescent luminaires installed
on the wall above the door or on the ceiling
(3) 150 mm (6 in.) for recessed incandescent or LED luminaires with a
completely enclosed light source installed in the wall or the ceiling
(4) 150 mm (6 in.) for recessed fluorescent luminaires installed in the
wall or the ceiling
(5) Surface-mounted fluorescent or LED luminaires shall be permitted to
be installed within the storage space where identified for this use.
Best Answer
As far as code is concerned yes you can. Have seen some very nice jobs where the strips in plastic were attached behind the front framework, just enough of a space so the one that was used could not be seen unless actually looking under the cabinets. I like the coated ones so they can be wiped off, I have seen the “tapes” of lights attached exposed and wonder how long those will work especially close to a stove. So your plan is starting out well if you can mount them well and have the control switch in a good location it can be a nice application.