HI there, I would like to preface this post by saying that I am a real novice when it comes to asp.net but I am trying to learn by doing.
I have created a user control for the media section dashboard which allows a users to upload an image to umbraco and flickr simultaniously this all works fine however my next step was to allow users to use a media node picker to choose where the image is uploaded to in umbraco. I rooted through the zip uploader source to see how it was done in that package, however i am getting stuck with an error
the zip uploader code uses a bunch of assembly reference all of which i have copied into my own code (and uploaded the .bin references i think)
Where my code differes from the zip upload code is the the zip upload code uses this before the partial class
namespace Nibble.Umb.ZipUpload {
when i tried this i got the following error
error CS0122: 'Nibble.Umb.ZipUpload.MediaPickerDataExtractor' is inaccessible due to its protection level
at System.Web.Compilation.BuildManager
can anyone tell me what this means?
I then i tried referencing it with
using Nibble.Umb.ZipUpload;
instead of the namespace code, but i then get a missing assembly reference. Im not even sure if the nibble dll is what i need to be referenceing to get the media picker to work, when you get a reference missing error what is the best way to tell what the reference you need is?
so in summary does anyone know
a) what i am doing wrong b) a better way to do this?
Firstly good on you for giving it a go. You always learn quicker from being chucked in the deep end.
I think that it would pay for you to maybe get a book on .NET to understand the concepts. At the moment based on what you have said above you are trying to include your code in the Nibble.Umb.ZipUpload namespace which of course is not really allowed as this is part of another assembly.
Your second approach is to use the Nibble.Umb.ZipUpload assembly in your project. The reason you are getting the error is because you have probably not told your solution to include the reference to the dll. Including the dll in the bin is not enough. You also need to add the reference to the reference folder in your namespace.
At this point I cant really comment any further on what you are doing, as the Nibble Zip Uploader is using the nodepicker control from the umbraco assemblies. You would be better off not including the zip uploader assemblies but more create your own and just use the Nibble one as a guide to learn how its put together.
I know that I havent answered your question but I hope that I have helped give you a little understanding and direction on where to go from here.
Sorry it took an age to reply, I just wanted to say thanks for your answer. I think trying to butcher the nibble code just to get the node picker is probably a bad way to go. Does anyone have any pointers as to how to use the umbraco node picker in a custom user control?
Using media node picker in User Control
HI there, I would like to preface this post by saying that I am a real novice when it comes to asp.net but I am trying to learn by doing.
I have created a user control for the media section dashboard which allows a users to upload an image to umbraco and flickr simultaniously this all works fine however my next step was to allow users to use a media node picker to choose where the image is uploaded to in umbraco. I rooted through the zip uploader source to see how it was done in that package, however i am getting stuck with an error
the zip uploader code uses a bunch of assembly reference all of which i have copied into my own code (and uploaded the .bin references i think)
Where my code differes from the zip upload code is the the zip upload code uses this before the partial class
when i tried this i got the following error
error CS0122: 'Nibble.Umb.ZipUpload.MediaPickerDataExtractor' is inaccessible due to its protection level at System.Web.Compilation.BuildManager
can anyone tell me what this means?
I then i tried referencing it with
instead of the namespace code, but i then get a missing assembly reference. Im not even sure if the nibble dll is what i need to be referenceing to get the media picker to work, when you get a reference missing error what is the best way to tell what the reference you need is?
so in summary does anyone know
a) what i am doing wrong
b) a better way to do this?
thanks in advance.
Hi Lachlann
Firstly good on you for giving it a go. You always learn quicker from being chucked in the deep end.
I think that it would pay for you to maybe get a book on .NET to understand the concepts. At the moment based on what you have said above you are trying to include your code in the Nibble.Umb.ZipUpload namespace which of course is not really allowed as this is part of another assembly.
Your second approach is to use the Nibble.Umb.ZipUpload assembly in your project. The reason you are getting the error is because you have probably not told your solution to include the reference to the dll. Including the dll in the bin is not enough. You also need to add the reference to the reference folder in your namespace.
At this point I cant really comment any further on what you are doing, as the Nibble Zip Uploader is using the nodepicker control from the umbraco assemblies. You would be better off not including the zip uploader assemblies but more create your own and just use the Nibble one as a guide to learn how its put together.
I know that I havent answered your question but I hope that I have helped give you a little understanding and direction on where to go from here.
Peter
EDIT that should say
You also need to add the reference to the reference folder in your project.
thanks
Hi Peter,
Sorry it took an age to reply, I just wanted to say thanks for your answer. I think trying to butcher the nibble code just to get the node picker is probably a bad way to go. Does anyone have any pointers as to how to use the umbraco node picker in a custom user control?
thanks
Lachlann
is working on a reply...