Hi guys.
Im building a blog using the radeditor. Im trying to control the amount of images uploaded by any user using the FileUploadEvent.
The thing is im storing the ammount of images uploaded on the control (the blog control)'s viewstate. The thing is, when I ask for the viewstate (and actually for any other control contained on the Blog Control, for example a given text field) It returns me a null.
Here's the code:
int currentUploadedImages = Entry.ImageCount;
currentUploadedImages++;
if (currentUploadedImages > 4) {
File.Delete(fileName);
EntryMessage.ShowMessage("Lo sentimos, sólo puedes cargar 4 imágenes por relato. Elimina una de las imágenes ya cargadas e inténtalo de nuevo."
, ModalMessageType.Forbidden);
}
Entry.ImageCount = currentUploadedImages;
return true;
Also the rad editor is displaying the stylesheet loaded by the Masterpage/Page and I dont need it to do it.
Aditionally I have an Image wich displays a modal pop up extender that has the post's preview. In firefox works great, but in internet explorer the function isn't fired until any other control does a "postback" (for example I have a button that tags the entry, if I tag the entry and then press the preview works great, but If I haven't done anything it doesnt fires the javascript function
By the way. The Blog Control is inside an ajax update panel
Merry Xmas , Happy new Year and thanks for the help
Regards
Jaime.
Im building a blog using the radeditor. Im trying to control the amount of images uploaded by any user using the FileUploadEvent.
The thing is im storing the ammount of images uploaded on the control (the blog control)'s viewstate. The thing is, when I ask for the viewstate (and actually for any other control contained on the Blog Control, for example a given text field) It returns me a null.
Here's the code:
int currentUploadedImages = Entry.ImageCount;
currentUploadedImages++;
if (currentUploadedImages > 4) {
File.Delete(fileName);
EntryMessage.ShowMessage("Lo sentimos, sólo puedes cargar 4 imágenes por relato. Elimina una de las imágenes ya cargadas e inténtalo de nuevo."
, ModalMessageType.Forbidden);
}
Entry.ImageCount = currentUploadedImages;
return true;
Also the rad editor is displaying the stylesheet loaded by the Masterpage/Page and I dont need it to do it.
Aditionally I have an Image wich displays a modal pop up extender that has the post's preview. In firefox works great, but in internet explorer the function isn't fired until any other control does a "postback" (for example I have a button that tags the entry, if I tag the entry and then press the preview works great, but If I haven't done anything it doesnt fires the javascript function
By the way. The Blog Control is inside an ajax update panel
Merry Xmas , Happy new Year and thanks for the help
Regards
Jaime.