I'd like to enable/disable layers on my application but i'm having some problems with that.
I found a sample which does exactly what I want, here.
I also saw that to make it work I need to put my layers on my MapServer using this but there is no any "share as" in my arcmap since i'm running the v10.0. All I want at the moment would be to generate such link to get my layers.
layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer");
According to the help I have to up it into arcgisOnline
No you have to up it into your ArcGIS Server. When you publish your service using the wizard given in the link, it asks for your arcgis server location and the service name. Once you do that service is published in your ArcGIS server
i think what Diane is saying is that she is using ArcGIS Online to publish her data. since AGOL only supports publishing hosted cached map services and feature services, so you are not able to create an ArcGISDynamicMapServiceLayer object pointing at AGOL content.