Click here to Skip to main content
15,890,741 members
Home / Discussions / C#
   

C#

 
GeneralRe: Split personality Pin
Christian Graus21-Sep-07 15:53
protectorChristian Graus21-Sep-07 15:53 
GeneralRe: Split personality Pin
Insincere Dave21-Sep-07 17:02
Insincere Dave21-Sep-07 17:02 
QuestionImpersonation over multiple servers using WCF Pin
Or Rotem21-Sep-07 11:02
Or Rotem21-Sep-07 11:02 
QuestionCustom attributes in C# for method Pin
Or Rotem21-Sep-07 11:01
Or Rotem21-Sep-07 11:01 
AnswerRe: Custom attributes in C# for method Pin
Scott Dorman21-Sep-07 12:56
professionalScott Dorman21-Sep-07 12:56 
GeneralRe: Custom attributes in C# for method Pin
Or Rotem21-Sep-07 19:21
Or Rotem21-Sep-07 19:21 
GeneralRe: Custom attributes in C# for method Pin
Scott Dorman22-Sep-07 5:16
professionalScott Dorman22-Sep-07 5:16 
QuestionProblem with uploading system Pin
Frozzare21-Sep-07 10:15
Frozzare21-Sep-07 10:15 
I'm trying to set with filetype there are aloud to be when your are uploading.

I gett this errormessanger: CS1525: Invalid expression term '.'

The line thats error:

Line 10: string StrFileType = File1.PostedFile.ContentType(.JPG | .PNG)

The hole code:

void UploadFile(object Sender,EventArgs E)
{
if (File1.PostedFile !=null)
{
/
string StrFileName = File1.PostedFile.FileName.Substring(File1.PostedFile.FileName.LastIndexOf("\\") + 1) ;
string StrFileType = File1.PostedFile.ContentType(.JPG | .PNG) ;
int fileSize = (int)Math.Round((double)File1.PostedFile.ContentLength / 1024, 0);
int maxSize = 1024;
if (fileSize > maxSize)

Response.Write(" Uppladningen misslyckades! Storlek får högst vara 1mb ");
else
{
File1.PostedFile.SaveAs(Server.MapPath("img\\" + StrFileName));


lblUploadedFileName.Text ="Länken till bilden: http://domain.com/se/img/"+StrFileName;


lblbbcode.Text ="BBCode: [img]http://domain.com/se/img/"+StrFileName + "[/img]";


}
}
}

Frozzare, Segeltorps Scoutkår
www.segeltorps.scoutkar.nu

AnswerRe: Problem with uploading system Pin
Pete O'Hanlon21-Sep-07 10:28
mvePete O'Hanlon21-Sep-07 10:28 
GeneralRe: Problem with uploading system Pin
Frozzare21-Sep-07 10:37
Frozzare21-Sep-07 10:37 
GeneralRe: Problem with uploading system Pin
leckey21-Sep-07 11:15
leckey21-Sep-07 11:15 
AnswerRe: Problem with uploading system Pin
m v ramana22-Sep-07 2:59
m v ramana22-Sep-07 2:59 
QuestionData from text box Pin
sajid.salim.khan21-Sep-07 9:35
sajid.salim.khan21-Sep-07 9:35 
AnswerRe: Data from text box Pin
PIEBALDconsult21-Sep-07 9:43
mvePIEBALDconsult21-Sep-07 9:43 
GeneralRe: Data from text box Pin
sajid.salim.khan21-Sep-07 9:59
sajid.salim.khan21-Sep-07 9:59 
GeneralRe: Data from text box Pin
Matthew Cuba21-Sep-07 10:02
Matthew Cuba21-Sep-07 10:02 
GeneralRe: Data from text box Pin
sajid.salim.khan21-Sep-07 15:11
sajid.salim.khan21-Sep-07 15:11 
GeneralRe: Data from text box Pin
Chintan.Desai21-Sep-07 20:36
Chintan.Desai21-Sep-07 20:36 
QuestionNUnit - Run all unit tests for a specific namespace Pin
Polymorpher21-Sep-07 9:29
Polymorpher21-Sep-07 9:29 
QuestionHow to get cell value in gridView Pin
ss.mmm21-Sep-07 9:15
ss.mmm21-Sep-07 9:15 
AnswerRe: How to get cell value in gridView Pin
George L. Jackson21-Sep-07 12:25
George L. Jackson21-Sep-07 12:25 
QuestionTooltip Pin
babbelfisken21-Sep-07 9:08
babbelfisken21-Sep-07 9:08 
AnswerRe: Tooltip Pin
Chintan.Desai21-Sep-07 20:39
Chintan.Desai21-Sep-07 20:39 
QuestionThreading questions/advice sought Pin
martin_hughes21-Sep-07 8:55
martin_hughes21-Sep-07 8:55 
AnswerRe: Threading questions/advice sought Pin
Pete O'Hanlon21-Sep-07 9:17
mvePete O'Hanlon21-Sep-07 9:17 

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.