Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. is this coding correct?

is this coding correct?

Scheduled Pinned Locked Moved C#
sysadminhelpquestion
24 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Thomas Toh
    wrote on last edited by
    #1

    string sFilename = System.IO.Path.GetFileName(myFile.FileName); string ans; while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Console.Write("Do you want to overwrite? (Yes/No)"); ans = Console.ReadLine(); Console.WriteLine(""); while (ans = Yes) { } logic: check if image already existed when uploading, if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. im lost.. plz help

    C T 6 Replies Last reply
    0
    • T Thomas Toh

      string sFilename = System.IO.Path.GetFileName(myFile.FileName); string ans; while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Console.Write("Do you want to overwrite? (Yes/No)"); ans = Console.ReadLine(); Console.WriteLine(""); while (ans = Yes) { } logic: check if image already existed when uploading, if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. im lost.. plz help

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      This is about as lost as you can be. 1 - this is not the ASP.NET forum 2 - Why are you not using Path.Combine in your second step ? 3 - The console is not visible at all in a windows app, and it sure is not visible to an ASP.NET user. I remember telling you all this before, I suggest you buy a basic ASP.NET book and read it before going further. Oh, and a basic C# book, you have a constant string not in quotes from the look of it.

      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 )

      1 Reply Last reply
      0
      • T Thomas Toh

        string sFilename = System.IO.Path.GetFileName(myFile.FileName); string ans; while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Console.Write("Do you want to overwrite? (Yes/No)"); ans = Console.ReadLine(); Console.WriteLine(""); while (ans = Yes) { } logic: check if image already existed when uploading, if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. im lost.. plz help

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        Just to add, last time you ignored my responses, waited two days and asked again. It's obviously not getting any better, you obviously are totally lost. If you respond, perhaps I can help you, but the starting point is definately a beginners book. I sincerely hope this is just a fun project and not paid work at this point.

        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 )

        1 Reply Last reply
        0
        • T Thomas Toh

          string sFilename = System.IO.Path.GetFileName(myFile.FileName); string ans; while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Console.Write("Do you want to overwrite? (Yes/No)"); ans = Console.ReadLine(); Console.WriteLine(""); while (ans = Yes) { } logic: check if image already existed when uploading, if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. im lost.. plz help

          T Offline
          T Offline
          Thomas Toh
          wrote on last edited by
          #4

          heh i might missed the entry, sorry about that. i know i'm not an expert but please at least if you're not gonna provide something constructive, then shut it. for sure a book may help but if thats the option i wouldn't post here lol.

          C M J 3 Replies Last reply
          0
          • T Thomas Toh

            string sFilename = System.IO.Path.GetFileName(myFile.FileName); string ans; while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Console.Write("Do you want to overwrite? (Yes/No)"); ans = Console.ReadLine(); Console.WriteLine(""); while (ans = Yes) { } logic: check if image already existed when uploading, if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. im lost.. plz help

            T Offline
            T Offline
            Thomas Toh
            wrote on last edited by
            #5

            ok i'll rephrase my question, i'm doing asp.net with c#. for this particular function, i need to use VB input box in c# to validate user input. i've read http://www.mdibb.net/net/using\_the\_visual\_basic\_input\_box\_in\_c/ but it doesnt seem to work as it says MessageBox.show does not exit in current context. PS: christian, if you don't feel like answering is ok, no one is forcing you. and btw this forum doesn't state its not for beginners. if you have no patience teaching, then don't. ;P

            C V 2 Replies Last reply
            0
            • T Thomas Toh

              ok i'll rephrase my question, i'm doing asp.net with c#. for this particular function, i need to use VB input box in c# to validate user input. i've read http://www.mdibb.net/net/using\_the\_visual\_basic\_input\_box\_in\_c/ but it doesnt seem to work as it says MessageBox.show does not exit in current context. PS: christian, if you don't feel like answering is ok, no one is forcing you. and btw this forum doesn't state its not for beginners. if you have no patience teaching, then don't. ;P

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Thomas Toh wrote:

              i'm doing asp.net with c#.

              Then you should probably use the ASP.NET forum. I told you that last time

              Thomas Toh wrote:

              i need to use VB input box in c# to validate user input

              Well, you really can't. This is why I'm telling you to buy a book, you're missing what ASP.NET *is*. The only thing you can run on the client side, is javascript.

              Thomas Toh wrote:

              but it doesnt seem to work as it says MessageBox.show does not exit in current context.

              Yes, it's trying to tell you what I've told you four times now.

              Thomas Toh wrote:

              and btw this forum doesn't state its not for beginners.

              I am always happy to help beginners. It's people who ignore advice and just ask the same things that frustrate me. So - for the fifth time. ASP.NET means that you can't use the console, or the message box, or any other winforms or other client side construct to show a message to the end user. Your best bet, is to create a new filename on the server, or to create a new folder to put the same file in. Or, just store it in a DB, where the names can overlap, so long as there's some other way to identify them. Why are you saving an image in the first place ?

              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 )

              R 1 Reply Last reply
              0
              • T Thomas Toh

                heh i might missed the entry, sorry about that. i know i'm not an expert but please at least if you're not gonna provide something constructive, then shut it. for sure a book may help but if thats the option i wouldn't post here lol.

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                Thomas Toh wrote:

                for sure a book may help but if thats the option i wouldn't post here lol.

                Why is it not an option ?

                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 )

                L 1 Reply Last reply
                0
                • T Thomas Toh

                  ok i'll rephrase my question, i'm doing asp.net with c#. for this particular function, i need to use VB input box in c# to validate user input. i've read http://www.mdibb.net/net/using\_the\_visual\_basic\_input\_box\_in\_c/ but it doesnt seem to work as it says MessageBox.show does not exit in current context. PS: christian, if you don't feel like answering is ok, no one is forcing you. and btw this forum doesn't state its not for beginners. if you have no patience teaching, then don't. ;P

                  V Offline
                  V Offline
                  vytheese
                  wrote on last edited by
                  #8

                  Hey I think you complicating the things much. There are out of the box validation controls avialable for the Asp.NET controls. Can you justify why you want to use VB controls ?.

                  Thomas Toh wrote:

                  but it doesnt seem to work as it says MessageBox.show does not exit in current context.

                  MessageBox.Show works in win forms not in asp.net. To achieve the same you can use javascript. And also forum is not only for throwing a instant answer for the moment, its also guides one to look further on the topics you posted.. So on that sense he told you to buy a book and its also a way of teaching too. Its worth to read a book on starting stage.

                  Regards, Vythees Miles to go before sleep...

                  C 1 Reply Last reply
                  0
                  • T Thomas Toh

                    string sFilename = System.IO.Path.GetFileName(myFile.FileName); string ans; while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Console.Write("Do you want to overwrite? (Yes/No)"); ans = Console.ReadLine(); Console.WriteLine(""); while (ans = Yes) { } logic: check if image already existed when uploading, if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. im lost.. plz help

                    T Offline
                    T Offline
                    Thomas Toh
                    wrote on last edited by
                    #9

                    ok finally thanks for ur constructive response......... so it's possible to use javascript on asp.net for that? im doing a simple website that allows users to upload image (simply copy/paste image from other folders to my application/images folder). also additional functions.. one of them is to validate whether the image i'm going to upload already existed.. if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. i downloaded the sourcecode from here http://www.codeproject.com/KB/aspnet/netimageupload.aspx also from there modify. atm im stuck at this function... later i'll have to do a Search function on the webpage. that is to search via descriptions/properties of the image not just the filename and i'm not allowed to use DB for that (tho its quite easier right)?

                    C 1 Reply Last reply
                    0
                    • T Thomas Toh

                      ok finally thanks for ur constructive response......... so it's possible to use javascript on asp.net for that? im doing a simple website that allows users to upload image (simply copy/paste image from other folders to my application/images folder). also additional functions.. one of them is to validate whether the image i'm going to upload already existed.. if yes, ask user for input yes/no, if yes overwrite, if no, change a new filename. i downloaded the sourcecode from here http://www.codeproject.com/KB/aspnet/netimageupload.aspx also from there modify. atm im stuck at this function... later i'll have to do a Search function on the webpage. that is to search via descriptions/properties of the image not just the filename and i'm not allowed to use DB for that (tho its quite easier right)?

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #10

                      If you actually replied to my posts instead of yours, I'd get an email, and the threading on the forums would make sense.

                      Thomas Toh wrote:

                      so it's possible to use javascript on asp.net for that?

                      Kind of. You can show prompts using javascript. However, once you've done a postback, your chance for javascript validation is over, I'd just show a message saying the filename already exists in a control on the page, asking them to rename it and reupload. That is, if you need to do that, overall, I'd take one of the other approaches I suggested ( rename it, put it in a DB, etc )

                      Thomas Toh wrote:

                      that is to search via descriptions/properties of the image not just the filename and i'm not allowed to use DB for that (tho its quite easier right)?

                      You're actually doing a paid project here ? Why can't you use a DB ?

                      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 )

                      T 1 Reply Last reply
                      0
                      • C Christian Graus

                        Thomas Toh wrote:

                        i'm doing asp.net with c#.

                        Then you should probably use the ASP.NET forum. I told you that last time

                        Thomas Toh wrote:

                        i need to use VB input box in c# to validate user input

                        Well, you really can't. This is why I'm telling you to buy a book, you're missing what ASP.NET *is*. The only thing you can run on the client side, is javascript.

                        Thomas Toh wrote:

                        but it doesnt seem to work as it says MessageBox.show does not exit in current context.

                        Yes, it's trying to tell you what I've told you four times now.

                        Thomas Toh wrote:

                        and btw this forum doesn't state its not for beginners.

                        I am always happy to help beginners. It's people who ignore advice and just ask the same things that frustrate me. So - for the fifth time. ASP.NET means that you can't use the console, or the message box, or any other winforms or other client side construct to show a message to the end user. Your best bet, is to create a new filename on the server, or to create a new folder to put the same file in. Or, just store it in a DB, where the names can overlap, so long as there's some other way to identify them. Why are you saving an image in the first place ?

                        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 )

                        R Offline
                        R Offline
                        Roger Alsing 0
                        wrote on last edited by
                        #11

                        Are you sure? ;-) *hides*

                        My Blog

                        1 Reply Last reply
                        0
                        • C Christian Graus

                          If you actually replied to my posts instead of yours, I'd get an email, and the threading on the forums would make sense.

                          Thomas Toh wrote:

                          so it's possible to use javascript on asp.net for that?

                          Kind of. You can show prompts using javascript. However, once you've done a postback, your chance for javascript validation is over, I'd just show a message saying the filename already exists in a control on the page, asking them to rename it and reupload. That is, if you need to do that, overall, I'd take one of the other approaches I suggested ( rename it, put it in a DB, etc )

                          Thomas Toh wrote:

                          that is to search via descriptions/properties of the image not just the filename and i'm not allowed to use DB for that (tho its quite easier right)?

                          You're actually doing a paid project here ? Why can't you use a DB ?

                          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 )

                          T Offline
                          T Offline
                          Thomas Toh
                          wrote on last edited by
                          #12

                          thanks but i don't quite understand your sentence "However, once you've done a postback, your chance for javascript validation is over" it's a school project.. no idea as teacher said DB is unnecessary..is there any other way? i've done a simple but not yet complete code lol... if (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Response.Write("<script type=\"text/javascript\">var result = confirm('Image already existed. Click OK to overwrite. Click NO for new filename.')</script>"); }

                          C 1 Reply Last reply
                          0
                          • V vytheese

                            Hey I think you complicating the things much. There are out of the box validation controls avialable for the Asp.NET controls. Can you justify why you want to use VB controls ?.

                            Thomas Toh wrote:

                            but it doesnt seem to work as it says MessageBox.show does not exit in current context.

                            MessageBox.Show works in win forms not in asp.net. To achieve the same you can use javascript. And also forum is not only for throwing a instant answer for the moment, its also guides one to look further on the topics you posted.. So on that sense he told you to buy a book and its also a way of teaching too. Its worth to read a book on starting stage.

                            Regards, Vythees Miles to go before sleep...

                            C Offline
                            C Offline
                            Christian Graus
                            wrote on last edited by
                            #13

                            His issue is, he doesn't know the file already exists until his postback has occured. I've never seen anyone try to output a prompt in a website on the console before tho.

                            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 )

                            1 Reply Last reply
                            0
                            • T Thomas Toh

                              thanks but i don't quite understand your sentence "However, once you've done a postback, your chance for javascript validation is over" it's a school project.. no idea as teacher said DB is unnecessary..is there any other way? i've done a simple but not yet complete code lol... if (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename))) { Response.Write("<script type=\"text/javascript\">var result = confirm('Image already existed. Click OK to overwrite. Click NO for new filename.')</script>"); }

                              C Offline
                              C Offline
                              Christian Graus
                              wrote on last edited by
                              #14

                              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 )

                              T 1 Reply Last reply
                              0
                              • C Christian Graus

                                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 )

                                T Offline
                                T Offline
                                Thomas Toh
                                wrote on last edited by
                                #15

                                i'm not sure whether the teacher is dumb or what lol. personally i think DB is so much easier and i have no idea why she said it's unnecessary not needed. well, i guess i'd have to follow your path lol.i rougly know your idea.. is there a website guide that you could show me so that I can follow the guide?

                                C 1 Reply Last reply
                                0
                                • T Thomas Toh

                                  i'm not sure whether the teacher is dumb or what lol. personally i think DB is so much easier and i have no idea why she said it's unnecessary not needed. well, i guess i'd have to follow your path lol.i rougly know your idea.. is there a website guide that you could show me so that I can follow the guide?

                                  C Offline
                                  C Offline
                                  Christian Graus
                                  wrote on last edited by
                                  #16

                                  OK - well, your only other option is to store the text in something like an XML file that you maintain. A DB would definately be easier.

                                  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 )

                                  T 1 Reply Last reply
                                  0
                                  • C Christian Graus

                                    OK - well, your only other option is to store the text in something like an XML file that you maintain. A DB would definately be easier.

                                    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 )

                                    T Offline
                                    T Offline
                                    Thomas Toh
                                    wrote on last edited by
                                    #17

                                    yes :) i store those image descriptions to a HTML // Save the stream to disk System.IO.FileStream newFile = new System.IO.FileStream(Server.MapPath(sSavePath + sFilename), System.IO.FileMode.Create); newFile.Write(myData, 0, myData.Length); newFile.Close(); TextWriter tw = new StreamWriter(Server.MapPath("Images/Saved Images/" + sFilename + ".html")); // write a line of text to the files tw.WriteLine("<html>"); tw.WriteLine("<img src=\"" + sSavePath + sFilename + "\">" + " " + "<desc=\"" + desc.Text + "\">" + " " + "<mat=\"" + materials.Text + "\">" + " " + "<date=\"" + date.Text + "\">"); tw.WriteLine("</html>"); // close the stream tw.Close(); right now i have to solve this function... and next is the toughest part since not using DB.. which is the Searching :)

                                    C 1 Reply Last reply
                                    0
                                    • T Thomas Toh

                                      yes :) i store those image descriptions to a HTML // Save the stream to disk System.IO.FileStream newFile = new System.IO.FileStream(Server.MapPath(sSavePath + sFilename), System.IO.FileMode.Create); newFile.Write(myData, 0, myData.Length); newFile.Close(); TextWriter tw = new StreamWriter(Server.MapPath("Images/Saved Images/" + sFilename + ".html")); // write a line of text to the files tw.WriteLine("<html>"); tw.WriteLine("<img src=\"" + sSavePath + sFilename + "\">" + " " + "<desc=\"" + desc.Text + "\">" + " " + "<mat=\"" + materials.Text + "\">" + " " + "<date=\"" + date.Text + "\">"); tw.WriteLine("</html>"); // close the stream tw.Close(); right now i have to solve this function... and next is the toughest part since not using DB.. which is the Searching :)

                                      C Offline
                                      C Offline
                                      Christian Graus
                                      wrote on last edited by
                                      #18

                                      Well, that's not much use. A single XML file with all your metadata is the most sensible way to do non DB search.

                                      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 )

                                      T 1 Reply Last reply
                                      0
                                      • C Christian Graus

                                        Well, that's not much use. A single XML file with all your metadata is the most sensible way to do non DB search.

                                        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 )

                                        T Offline
                                        T Offline
                                        Thomas Toh
                                        wrote on last edited by
                                        #19

                                        ok i got you... a single XML with all my metadata.. but i remember teacher mentioning about each image file -> each html .. nevertheless, is there any keyword i shld search online for any guide or maybe u could provide some...?

                                        C 1 Reply Last reply
                                        0
                                        • T Thomas Toh

                                          ok i got you... a single XML with all my metadata.. but i remember teacher mentioning about each image file -> each html .. nevertheless, is there any keyword i shld search online for any guide or maybe u could provide some...?

                                          C Offline
                                          C Offline
                                          Christian Graus
                                          wrote on last edited by
                                          #20

                                          I would expect that having a single XML file with the file path as the key to storing/updating data would be best. The XmlDocument class is the way to parse XML and XPath is the language you use to do that. If you have a bunch of HTML files, then you can load those as XML, if it's XHTML, but how do you write the code to search ? Sounds messy. A single file with all the metadata, which you can then search, seems best, although it's a long way away from the ease of doing it with a database.

                                          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 )

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups