Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Guys,

I have an aspx page in the following folder.
~/modules/personnel/create/createstaffrecord.aspx

And a web service in the following folder.
~/services/CacheService.asmx
I tried the following but did not get any of it working:

(1). url: '../services/CacheService.asmx/GetSelectedCountryId'
(2). url: '../../services/CacheService.asmx/GetSelectedCountryId'
(3). url: '../../../services/CacheService.asmx/GetSelectedCountryId'
(4). url: 'services/CacheService.asmx/GetSelectedCountryId'

How do I get it working please.

Thanks in anticipation.
Posted
Updated 30-Nov-11 1:57am
v2

Try using '/services/CacheService.asmx/GetSelectedCountryId'. If that doesn't work, start up debugging and browse to the asmx file to make sure there's not a run-time error that's stopping it.
 
Share this answer
 
Comments
awedaonline 30-Nov-11 9:05am    
Thanks, I get no result event when I stepped through.
Leeland Clay 30-Nov-11 9:08am    
When you say "no result event", do you mean there was no results returned or that it never went into the asmx file?
I solved it by placing the code in the ~/modules/personnel/create/createstaffrecord.aspx.aspx.vb file and now referred to it like this:
CreateStaffRecord.aspx/GetSelectedStateId
 
Share this answer
 
Comments
Leeland Clay 30-Nov-11 9:13am    
AHHHHHH...OK. I think I know what the root problem is. I've seen issues where a project is created as a website project instead of a web application project. In my case, the website project would not compile the code behind of any file other than aspx pages. Therefore, asmx files didn't work.

Glad to hear you got it working either way.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900