Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

share a var and set the path

Avatar of QPR
QPRFlag for New Zealand asked on
ASP.NET
21 Comments1 Solution340 ViewsLast Modified:
I have a sub that calls another sub.
During the second sub a variable value is set. How can I then access that var from the calling sub.
The second sub sets a var to be the value of a fileupload path. The 1st sub does an insert into a table and needs that value.

Also, how can I make the saveas path local to the app?
I tried "~/appname/images/photos" + fileName
But I get an error saying that the path is not rooted?
I can use "c:\temp\uploads\" + filename but I'd prefer to keep the path relative to the app
ASKER CERTIFIED SOLUTION
Avatar of lijunguo
lijunguoFlag of Australia image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 21 Comments.
See Answers