Click here to Skip to main content
15,949,686 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to read UNREAD mails from mail server??? Pin
Christian Graus15-Jun-09 15:20
protectorChristian Graus15-Jun-09 15:20 
AnswerRe: How to read UNREAD mails from mail server??? Pin
anil indorkar28-Jan-10 4:08
anil indorkar28-Jan-10 4:08 
QuestionOpen links without popup message Pin
samerh14-Jun-09 20:55
samerh14-Jun-09 20:55 
Questionwant to use a function loadstring common for whole website Pin
anbusenthil14-Jun-09 20:44
anbusenthil14-Jun-09 20:44 
Questionb4 upload images check images/flash dimension Pin
Member 387988114-Jun-09 20:35
Member 387988114-Jun-09 20:35 
AnswerRe: b4 upload images check images/flash dimension Pin
Matt Cavanagh14-Jun-09 21:17
Matt Cavanagh14-Jun-09 21:17 
GeneralRe: b4 upload images check images/flash dimension Pin
Abhijit Jana14-Jun-09 21:37
professionalAbhijit Jana14-Jun-09 21:37 
AnswerRe: b4 upload images check images/flash dimension Pin
Abhijit Jana14-Jun-09 21:23
professionalAbhijit Jana14-Jun-09 21:23 
Member 3879881 wrote:
suppose if i say the image dimension is 300*250...,
it have to accept that much only...,
cant accept 301*250 also...,

Here is an simple logic, Hope this will help you

int imgWidth=301;
int imgHeight=250;

if(ValidateImageDimension(FileUpload.PostedFile.InputStream, 301, 250));
  {
   //Valid Image Size
  }
  else
  {
   //Image Size is not valid
  }

Here is the generic function

public bool ValidateImageDimension(Stream imgstream, int imgWidth, int imgHeight)
        {
            System.Drawing.Image img = System.Drawing.Image.FromStream(imgstream);
            if (img.Width <= imgWidth && img.Height <= imgHeight)
                return true;
            else
                return false;
        }


Hope this will help you. Smile | :)

cheers,
Abhijit
CodeProject MVP
Web Site:abhijitjana.net
View My Recent Article

GeneralRe: b4 upload images check images/flash dimension Pin
Matt Cavanagh15-Jun-09 10:56
Matt Cavanagh15-Jun-09 10:56 
QuestionLimited Update in Table Pin
Girish48114-Jun-09 20:07
Girish48114-Jun-09 20:07 
AnswerRe: Limited Update in Table Pin
saanj14-Jun-09 20:11
saanj14-Jun-09 20:11 
GeneralRe: Limited Update in Table Pin
Girish48114-Jun-09 20:15
Girish48114-Jun-09 20:15 
GeneralRe: Limited Update in Table Pin
saanj14-Jun-09 20:26
saanj14-Jun-09 20:26 
GeneralRe: Limited Update in Table Pin
Girish48114-Jun-09 20:42
Girish48114-Jun-09 20:42 
GeneralRe: Limited Update in Table Pin
saanj14-Jun-09 20:56
saanj14-Jun-09 20:56 
GeneralRe: Limited Update in Table Pin
Girish48114-Jun-09 21:16
Girish48114-Jun-09 21:16 
GeneralRe: Limited Update in Table Pin
saanj14-Jun-09 23:28
saanj14-Jun-09 23:28 
GeneralRe: Limited Update in Table Pin
Girish48114-Jun-09 23:56
Girish48114-Jun-09 23:56 
GeneralRe: Limited Update in Table Pin
Girish48114-Jun-09 23:59
Girish48114-Jun-09 23:59 
GeneralRe: Limited Update in Table Pin
saanj15-Jun-09 2:24
saanj15-Jun-09 2:24 
GeneralRe: Limited Update in Table Pin
Girish48115-Jun-09 2:45
Girish48115-Jun-09 2:45 
GeneralRe: Limited Update in Table Pin
saanj15-Jun-09 2:53
saanj15-Jun-09 2:53 
QuestionChk the below code ...(multilingual setting in all pgs in a website) Pin
anbusenthil14-Jun-09 19:30
anbusenthil14-Jun-09 19:30 
AnswerRe: Chk the below code ...(multilingual setting in all pgs in a website) Pin
saanj14-Jun-09 20:05
saanj14-Jun-09 20:05 
AnswerRe: Chk the below code ...(multilingual setting in all pgs in a website) Pin
Abhijit Jana14-Jun-09 21:26
professionalAbhijit Jana14-Jun-09 21:26 

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.