i have a webform on asp c# page
the user enters data into the form. there are textboxes and there's a treeview
when the user presses the SUBMIT button, i would like all the data to be shown to him for his confirmation. the user should have the option to continue with the submit OR to go back to the form and edit the data.
is there an all ready out of the box way to do this>? if not, what is the easiest way to implement this?
i have a webform on asp c# page
the user enters data into the form. there are textboxes and there's a treeview
when the user presses the SUBMIT button, i would like all the data to be shown to him for his confirmation. the user should have the option to continue with the submit OR to go back to the form and edit the data.
is there an all ready out of the box way to do this>? if not, what is the easiest way to implement this?
Share Improve this question asked Oct 23, 2011 at 3:31 baiapoopedbaiapooped 1854 silver badges13 bronze badges 1- have you found any answer for this? – Thariq Nugrohotomo Commented Jun 26, 2014 at 7:14
2 Answers
Reset to default 16If it's a button web control, you can add onClientClick
and a confirm javascript call.
<asp:button Id="btnSubmit" Text="Submit"
onClientClick=" return confirm('Are you sure?')"
onClick="btnSubmit_click" />
You can use a simple button and call a function which if your condition == true send your data or submit data using ajax
<input type="button" onclick="TestBeforeSubmit();"value="">
function TestBeforeSubmit()
{
if //Conditions == false)
{
}
else
{
$.ajax({
type: "POST",
url: "//YourUrl",
dataType: 'json',
data: //YourData,
success: function (result)
{
},
error: function (result) {
alert("Something went wrong");
},
});
}