Click here to Skip to main content
15,915,319 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWith out scroll tab need page...... Pin
Member 387988118-Apr-07 0:22
Member 387988118-Apr-07 0:22 
AnswerRe: With out scroll tab need page...... Pin
enjoycrack18-Apr-07 7:17
enjoycrack18-Apr-07 7:17 
QuestionSERVER APPLICATION ERROR Pin
piya00718-Apr-07 0:16
piya00718-Apr-07 0:16 
AnswerRe: SERVER APPLICATION ERROR Pin
wEb GuRu...18-Apr-07 5:30
wEb GuRu...18-Apr-07 5:30 
QuestionAsp.net update panel [modified] Pin
koleraba17-Apr-07 23:49
koleraba17-Apr-07 23:49 
AnswerRe: Asp.net update panel Pin
enjoycrack18-Apr-07 7:18
enjoycrack18-Apr-07 7:18 
GeneralRe: Asp.net update panel Pin
koleraba19-Apr-07 1:23
koleraba19-Apr-07 1:23 
QuestionResizing images on upload Pin
AdamskiR17-Apr-07 23:40
AdamskiR17-Apr-07 23:40 
Hi
I currently have a form for people to fill in, with this they need to uplaod a profile picture of themselves. At the moment I have the following code which uploads the image, but i want to be able to resize the image to a certin size. Ive seen resizing help on the web, but most of these seem to be large/thumbnail codes and im getting a bit boggled!

Boolean fileOK = false;
            String path = Server.MapPath("~/uploadedconsultantimages/");
            if (UploadImage.HasFile)
            {
                String fileExtension =
                    System.IO.Path.GetExtension(UploadImage.FileName).ToLower();
                String[] allowedExtensions = 
                { ".gif", ".png", ".jpeg", ".jpg" };
                for (int i = 0; i < allowedExtensions.Length; i++)
                {
                    if (fileExtension == allowedExtensions[i])
                    {
                        fileOK = true;
                    }
                }
            }

            if (fileOK)
            {
                try
                {
                    UploadImage.PostedFile.SaveAs(path
                        + UploadImage.FileName);
                    FileUploaded.Text = "File uploaded!";
                }
                catch (Exception ex)
                {
                    FileUploaded.Text = "File could not be uploaded.";
                }
            }
            else
            {
                FileUploaded.Text = "Cannot accept files of this type.";
            }


Any help would be appreciated. I working in c# .net2Smile | :)

Thanks
Adam
AnswerRe: Resizing images on upload Pin
Gavin Roberts18-Apr-07 0:42
Gavin Roberts18-Apr-07 0:42 
GeneralRe: Resizing images on upload Pin
AdamskiR18-Apr-07 0:55
AdamskiR18-Apr-07 0:55 
GeneralRe: Resizing images on upload Pin
Sandeep Akhare18-Apr-07 3:42
Sandeep Akhare18-Apr-07 3:42 
GeneralRe: Resizing images on upload Pin
AdamskiR18-Apr-07 4:11
AdamskiR18-Apr-07 4:11 
GeneralRe: Resizing images on upload Pin
Sandeep Akhare18-Apr-07 4:39
Sandeep Akhare18-Apr-07 4:39 
GeneralRe: Resizing images on upload Pin
AdamskiR18-Apr-07 4:51
AdamskiR18-Apr-07 4:51 
Questionpass argument to crystal report Pin
senthilmca17-Apr-07 23:12
senthilmca17-Apr-07 23:12 
AnswerRe: pass argument to crystal report Pin
Sylvester george17-Apr-07 23:16
Sylvester george17-Apr-07 23:16 
AnswerRe: pass argument to crystal report Pin
Member 387988118-Apr-07 0:32
Member 387988118-Apr-07 0:32 
QuestionFile Java Pin
kirthikirthi17-Apr-07 22:39
kirthikirthi17-Apr-07 22:39 
AnswerRe: J# Pin
Colin Angus Mackay17-Apr-07 23:50
Colin Angus Mackay17-Apr-07 23:50 
GeneralRe: J# Pin
kirthikirthi17-Apr-07 23:59
kirthikirthi17-Apr-07 23:59 
GeneralRe: J# Pin
Colin Angus Mackay18-Apr-07 6:25
Colin Angus Mackay18-Apr-07 6:25 
AnswerRe: J# Pin
J4amieC18-Apr-07 0:09
J4amieC18-Apr-07 0:09 
GeneralRe: J# Pin
kirthikirthi18-Apr-07 0:18
kirthikirthi18-Apr-07 0:18 
AnswerRe: J# Pin
Guffa18-Apr-07 0:17
Guffa18-Apr-07 0:17 
QuestionData Grid Delete using checkbox with customize delete button Pin
J Liang17-Apr-07 22:02
J Liang17-Apr-07 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.