Discussion:
content pages and code behind
Smotritsky, Alex
2007-07-11 15:28:23 UTC
Permalink
Efran Cobisi
2007-07-11 15:41:33 UTC
Permalink
If you are referring to pages that contain ContentPlaceholder control
istances then afaik no, it isn't correct.
Hope this helps.

--
Efran Cobisi
http://www.cobisi.com

Smotritsky, Alex wrote:
> Is it correct to say that content pages do not support code behind?
>
>
>
>
>
>
> ===================================
> This list is hosted by DevelopMentorĀ® http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Smotritsky, Alex
2007-07-11 16:10:10 UTC
Permalink
Rich Armstrong
2007-07-11 16:44:58 UTC
Permalink
Scott Allen
2007-07-11 17:50:05 UTC
Permalink
Smotritsky, Alex
2007-07-11 18:37:19 UTC
Permalink
Andrew Dunn
2007-07-11 23:07:57 UTC
Permalink
Chris Anderson
2007-07-11 23:34:18 UTC
Permalink
Chris Anderson
2007-07-11 23:39:39 UTC
Permalink
Andrew Dunn
2007-07-12 01:56:59 UTC
Permalink
Adam Sills
2007-07-12 03:59:39 UTC
Permalink
Andrew Dunn
2007-07-12 06:33:25 UTC
Permalink
kara hewett
2007-07-12 11:07:24 UTC
Permalink
Hi Andrew,

The PatientPhoto class should implement IDisposable like

public class PatientPhoto: IDisposable
{
~PatientPhoto()
{
Dispose();
}

}

and dispose of the Photo object within the Dispose implementation. After
the Photo object is disposed, it seems unnecessary to set the object to
null. Optionally you could suppress further garbage collection within the
Dispose implementation through GC.SuppressFinalize(this);

Kara


On 7/11/07, Andrew Dunn <***@hcn.com.au> wrote:
>
> Hi,
>
> Can anyone see a better way of doing this. I have a class that holds an
> image as one of it's properties. This image is held in the windows temp
> directory. I want to delete it when the class is destroyed. Is Dispose
> the best place to do this? Is ~PatientPhoto() OK to call dispose?
>
>
>
>
> public Bitmap Photo
> {
> get{ return _Photo;}
> set{ _Photo = value;}
> }
>
> ~PatientPhoto()
> {
> Dispose();
> }
>
> public void Dispose()
> {
> if(Photo != null)
> {
> if (Photo.Tag != null)
> {
> string FileLoc = Photo.Tag.ToString();
>
> ///Delete the photo file as it is stored in a
> temporary file in the windows temp directory
> if (File.Exists(FileLoc))
> {
> Photo.Dispose();
> Photo = null;
>
> try
> {
> File.Delete(FileLoc);
> }
> catch (IOException e)
> {
>
> System.Windows.Forms.MessageBox.Show(e.Message);
> }
> }
> }
> }
>
> }
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Loading...