Click here to Skip to main content
16,004,924 members
Home / Discussions / C#
   

C#

 
GeneralRe: is this coding correct? Pin
Christian Graus8-May-08 18:02
protectorChristian Graus8-May-08 18:02 
GeneralRe: is this coding correct? Pin
Roger Alsing8-May-08 18:56
Roger Alsing8-May-08 18:56 
GeneralRe: is this coding correct? Pin
vytheese8-May-08 18:04
professionalvytheese8-May-08 18:04 
GeneralRe: is this coding correct? Pin
Christian Graus8-May-08 19:16
protectorChristian Graus8-May-08 19:16 
AnswerRe: is this coding correct? Pin
Thomas Toh8-May-08 18:10
Thomas Toh8-May-08 18:10 
GeneralRe: is this coding correct? Pin
Christian Graus8-May-08 18:38
protectorChristian Graus8-May-08 18:38 
GeneralRe: is this coding correct? Pin
Thomas Toh8-May-08 19:15
Thomas Toh8-May-08 19:15 
GeneralRe: is this coding correct? Pin
Christian Graus8-May-08 19:20
protectorChristian Graus8-May-08 19:20 
Thomas Toh wrote:
as i said i'm not allowed to use DB....


But why not ?

Thomas Toh wrote:
Response.Write("var result = confirm('Image already existed. Click OK to overwrite. Click NO for new filename.')");


You're on the right track, but, your page will reload, then your file upload control is empty, and your message box pops up. You will need to do another postback, after the user selects the file again, to get anotehr shot at it. You could use AJAX, but even then, you can't access file paths from javascript. So, your only option as far as I can see, is to find a way to rename the files, or to store the files in folders so the names don't clash. For example, you could store it to a temp filename, store that name in the viewstate, then postback and ask for a new name or if you should overright, but you are better to ask that in the page, not with a popup.

Why can't you use a DB ? You're working on a photo site that needs to be searchable, but can't have a database ? For school, or for a client ?

Christian Graus

Please read this if you don't understand the answer I've given you

"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

GeneralRe: is this coding correct? Pin
Thomas Toh8-May-08 19:51
Thomas Toh8-May-08 19:51 
GeneralRe: is this coding correct? Pin
Christian Graus8-May-08 19:52
protectorChristian Graus8-May-08 19:52 
GeneralRe: is this coding correct? Pin
Thomas Toh8-May-08 19:58
Thomas Toh8-May-08 19:58 
GeneralRe: is this coding correct? Pin
Christian Graus8-May-08 20:02
protectorChristian Graus8-May-08 20:02 
GeneralRe: is this coding correct? Pin
Thomas Toh8-May-08 20:10
Thomas Toh8-May-08 20:10 
GeneralRe: is this coding correct? Pin
Christian Graus8-May-08 20:26
protectorChristian Graus8-May-08 20:26 
AnswerSearch/Parse/Display HTML Metadata Pin
Thomas Toh14-May-08 18:31
Thomas Toh14-May-08 18:31 
QuestionLittle Help Pin
nelsonpaixao8-May-08 15:53
nelsonpaixao8-May-08 15:53 
AnswerRe: Little Help Pin
Christian Graus8-May-08 15:57
protectorChristian Graus8-May-08 15:57 
AnswerRe: Little Help Pin
MarkB7778-May-08 18:05
MarkB7778-May-08 18:05 
Questionbeginner question: how to add method to a class using wizard in VC#2008? Pin
sharp_k8-May-08 14:52
sharp_k8-May-08 14:52 
AnswerRe: beginner question: how to add method to a class using wizard in VC#2008? Pin
Christian Graus8-May-08 15:56
protectorChristian Graus8-May-08 15:56 
GeneralRe: beginner question: how to add method to a class using wizard in VC#2008? Pin
sharp_k8-May-08 20:45
sharp_k8-May-08 20:45 
AnswerRe: beginner question: how to add method to a class using wizard in VC#2008? Pin
MarkB7778-May-08 18:13
MarkB7778-May-08 18:13 
AnswerRe: beginner question: how to add method to a class using wizard in VC#2008? Pin
tgrt8-May-08 23:06
tgrt8-May-08 23:06 
GeneralRe: beginner question: how to add method to a class using wizard in VC#2008? Pin
sharp_k9-May-08 5:36
sharp_k9-May-08 5:36 
Questionvalidation in win application Pin
jackal4u8-May-08 12:59
jackal4u8-May-08 12:59 

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.