2
Answers

How to fixed Social Liks in a Page

Rajveer singh

Rajveer singh

9y
273
1
Hi all,
 
      I have a problem ,my mini site and put social links in left side , but i want fixed this links mean page down or page up ,page scroll but this links not scroll as fixed ,how this?
 
 
Thanks 
Answers (2)
0
Nigel Fernandes

Nigel Fernandes

NA 4k 138.8k 7y
add EnableCORS on the action in your controller
0
Bryian Tan

Bryian Tan

NA 9.4k 887.2k 7y
I'm assuming the code is calling the Web API. If that the case, there is a section in this article that describe on how to Enabling Cross-Origin Requests (CORS).
 

Web API - Enabling Cross-Origin Requests (CORS)

Technically, the Web API can be hosted together with the Web Application or separately. In this sample application, the Web API and Web Application are being decoupled. That being said, the Web and API application could be hosted on a different subdomain or domain. By design, the web browser security, same-origin policy, will prevents a web page from making AJAX requests to another domain or subdomain. However, this issue can be overcome by Enabling Cross-Origin Requests (CORS) to explicitly allow cross-origin requests from the Web to the API application.

 
http://www.c-sharpcorner.com/article/asp-net-mvc-tooltip-using-web-api-bootstrap-popover-and-jquery-ui-dialog/ 
0
Gnanavel Sekar

Gnanavel Sekar

NA 6.8k 452k 7y
Hi Thiyagarajan,
 

Use JSONP 

jQuery:
$.ajax({
url:"api url/ url",
dataType: 'jsonp', // Notice! JSONP <-- P (lowercase)
success:function(json){
// do stuff with json (in this case an array)
alert("Success");
},
error:function(){
alert("Error");
}
});
 
and make sure whether included this header
 
("Access-Control-Allow-Origin: *"); 
 
 
 
 
0
Gokhul Varman

Gokhul Varman

NA 10.7k 9.4k 7y
you can refer the link for more clear information about it:https://stackoverflow.com/questions/15005500/loading-cross-domain-endpoint-with-jquery-ajax
0
Midhun T P

Midhun T P

NA 19.7k 281.1k 7y
Hi,
 
You have to give "Access-Control-Allow-Origin" header in your ajax content. 
  1. Response.AppendHeader("Access-Control-Allow-Origin""*");