How to refer path in Javascript

A

ad

I place a Loading.aspx in the Util folder of my project, Util folder in in
the root directory.
I refer Loading.aspx in this way: ~/Util/Loading.aspx in Javascript, But it
fail to find Loading.aspx in run time.
How can I refer Loading.aspx in Javascript?
Below in the actual code:
 
J

Joel Leong

You cannot use ~ (tilde) in client-side code. You need to register this code
in code behind the grab the root folder using request object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top