var url = 'http://localhost:55026/Home/getData';
var hiddendata = $("<input>").attr("name","snippet").attr('value',"content").attr('type', 'hidden')
var form = $('<form action="' + url + '" method="post" target="_blank" >' + '</form>');
$(form).append(hiddendata);
$('body').append(form);
form.submit();
[HttpPost, ValidateInput(false)]
public ActionResult getData(string snippet)
{
}
After getting value from controller i need to change the url like http://localhost:55026
instead of http://localhost:55026/Home/getData
;
Is this possible?