User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,509 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,807 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 3457 | Replies: 85 | Solved
Reply
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #71  
Feb 7th, 2008
and you should probably add an if statement there to see if the file exists before opening it. Because if it opens a non existing file, it will just be blank anyway. Throw a if statement to catch the error.
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #72  
Feb 7th, 2008
lol by flip flop dya mean swap all instances of savepath with filename and vice versa? or some specific instances?>
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #73  
Feb 7th, 2008
nope, just switch the two lines.

You appended the two strings together, then changed the file extension of one of the strings.

You need to change the file extension, THEN append
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #74  
Feb 7th, 2008
ok thanks. LOL now i am getting runtime error at line
Xpathdocument doc = new xpathdocument((C/temp+fileupload.filename))
error says it cant find "..........xml".
Last edited by majestic0110 : Feb 7th, 2008 at 12:25 pm.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #75  
Feb 7th, 2008
because it's not the same name anymore!

Declare savepath outside your function so it's a global variable, or throw it in with your "ApplyXSLTransformation()" to pass the new file name. I would recommend adding an argument to

ApplyXSLTransformation(savepath)

And just change all fileupload1.filename (WITHIN ApplyXSLTransformation) to savepath

Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #76  
Feb 7th, 2008
ok mate thanks I will let you know how it goes tomoro I got to dash now
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #77  
Feb 7th, 2008
I didnt think c# allowed globals to be declared am I wrong there ?
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #78  
Feb 7th, 2008
no clue. I'm not a C# programmer. Funny... I am a javascript programmer and I don't know C#?

They are basically the same ^^

Just throw the savepath in the transformation function as an argument, and trade out the "filename" with save path.
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #79  
Feb 8th, 2008
lol changed savepath to global var (well c# equivalent - static variable) and replaced all fileupload1.filename in ApplyXSLTransformation to savepath but runtime error of 'this class is not supported' at this line:
Xpathdocument doc = new xpathdocument((C/temp+fileupload.filename))
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #80  
Feb 8th, 2008
is it not fileName I need to replace fileupload1.filename with? becuase I cannot make fileName global (static)
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:01 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC