Hi, You have to cast the control first like foreach (Control c in form1.Controls) { if (c.ID == lnkLink) //where lnkLink is the ID of the control { LinkButton link = (LinkButton)c; //cast control object to whatever control it should be (ie. LinkButton, TextBox, etc.) bool status = c.Enabled; ... } }
ennaj
Posts
-
help for enabled property -
play mp3 saved in a folder outside root directoryThanks for your reply, Britney. That path is actually the ISP's file system. So I know that the directory d:\websites\sampleDomain\mp3s\ exists on the server. I tested it by having my application read a .txt file saved in that same folder. And it works. I just can't seem to access the mp3 file. I don't know if I have to convert it to another data type in order to read it. Thanks for the help!
-
play mp3 saved in a folder outside root directoryI hope someone can help me out with this one. I am working on a web application that plays mp3s. The mp3 player I'm using is PseudoMP3, the free .net mp3 player server control by A Boisen. My problem is that i'm trying to secure the mp3 files by saving them in a folder outside of my root, but I can't access the files from my application. My site is hosted by an ISP. My syntax for getting the files is: PseudoMP3Pick.Src = @"d:\websites\sampleDomain\mp3s\Superman.mp3"; The root directory is "d:\websites\sampleDomain\http\" This is how I choose the mp3 file to be played. When the page loads, the player says "Buffering..." and never stops. When I play mp3 files within the root, the player would say "Buffering..." for a few seconds and then starts playing the song. I'm using C#. Thanks for the help!