TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Karan Thakkar
1.5k
204
90.5k
How call controller Action result with Ajax in Mvc?
Sep 23 2019 1:37 AM
I want to call controller ActionResult from an ajax call which has one string paramenter.
like this
[HttpGet]
[Route("AreaName/ControllerName/MethodName/{filePath}")]
public ActionResult DeleteFile(string filePath) {
return Json(string.Empty, JsonRequestBehavior.AllowGet);
}
--Ajax call in jquery looks like this. when I am passing filePath without any special character ActionResult gets called but not when I pass below string.
var filePath='/OnlineFdDocument/200//UIDAI-Aadhar-Card-Updates-2-644x362.jpg'
$.ajax({
url: "/AreaName/Document/DeleteFile/" + filePath,
dataType: "json",
type: "Post",
contentType: 'application/json; charset=utf-8',
data: { "docUrl": docUrl },
success: function (data) {
},
If anyone can help me out the please reply.
Thank You...
Reply
Answers (
4
)
cannot modify function GetSelectStatement to generate select
Unable to cast object of type System.String to type System.B