function showMessageDetails() {
$.ajax({
url: '/Position/SelectedOption/',
type: 'POST',
data: { id: inputTextValue},
success: function (result) {
$.post("/Position/SelectedOption/" + inputTextValue, function (data) {
$('<div>' + data + '</div>').load(this.href).dialog({ show: { effect: "FadeIn", duration: 600} }, { modal: true });
});
},
error: function () {
alert("fail");
}
});
//Control code
public ActionResult SelectedOption(string id)
{
ModelClass ModelObject = new ModelClass();
return View("this.pagetoredirect", ModelObject);
}
inputTextValue = Pass your input value here
this.pagetoredirect = Give your View page name here
From the above code you can view the
View page as
Modal View.