I have a windows 8 hybrid app and now I want to migrate it to UWP. I am facing two issues and I have been searching on the internet for quite a few time. I want to know if UWP support ajax function. Also my anchor tag in href is not parsing. What might be the reason.
-
This is a low quality question. What have you tried? Where is your code? What research have you done? Just because you get your buddies to upvote your question doesn't mean it's a good question and that we will answer it. This is actually a pretty easy answer to find on google. – DotNetRussell Jul 11 '16 at 12:30
-
@AnthonyRussell I am new to stack overflow and therefore it might have possible that I may not have abide to the guidelines. UWP is a fairly new technology .Also, I have been searching on the internet on this for the past 24 hours and have not found a solution. All I have come across is HTTP request for ajax call. Its better not to judge someone blindly before knowing the exact scenario. Here is the code [link]
Sent Box – Preet Walia Jul 12 '16 at 06:31
-
Ehhh being new doesn't excuse anyone from following the rules. Also UWP is extremely well documented and the community (people like me) are very willing to help. – DotNetRussell Jul 12 '16 at 10:56
1 Answers
I want to know if UWP support ajax function
The answer is yes, you can use ajax in UWP Application. But there are a few things you need to notice when using ajax in UWP.
If you are using ajax to get data from a remote server, please make sure the
Internet(Client)
capability is enabled inpackage.appmanifest
. If you also want to call ajax from local server, make sure thePrivate Networks(Client & Server)
capability is enabled.If you are using a Content Security Policy in your app. Make sure the server address of your ajax call is included after
default-src
orconnect-src
in<meta>
. For details about CSP you can refer to this document.Cross-Origin should also under your concern when migrating. For enable CORS you can refer to add CORS support to server.
my anchor tag in href is not parsing. What might be the reason.
For safty reason, UWP doesn't support inline javascript. So codes like <a ng-click="jsfunc();"></a>
won't work. Please add eventListener in JS files.

- 10,801
- 1
- 13
- 24