Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net: c#/javascript user needs to confirm before submitting

i have a webform on asp.net 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?

like image 269
baiapooped Avatar asked Oct 23 '11 03:10

baiapooped


People also ask

Is ASP.NET a C?

ASP.NET is part of the . NET framework allowing you to write web applications using any CLS compliant language such as C#, VB.NET, F#, ... What you are referring to original asp language is called Classic ASP and it is not a language.

Is ASP.NET like C#?

ASP.NET is a web application development framework used to develop web applications using different back-end programming languages like C# where C# is used as an object-oriented programming language to develop web applications along with ASP.NET.

What is ASP.NET with C#?

ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites. It allows you to use a full featured programming language such as C# or VB.NET to build web applications easily.

Is C# and .NET the same?

C# is a programming language, . NET is a blanket term that tends to cover both the . NET Framework (an application framework library) and the Common Language Runtime which is the runtime in which . NET assemblies are run.


1 Answers

If 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" />
like image 129
Bala R Avatar answered Oct 22 '22 03:10

Bala R