I want pop out a confirm message box like
Response.Write("<Script>confirm('Are you sure???');</Script>");
But I want control if Ok then do wat else do wat.
I want pop out a confirm message box like
Response.Write("<Script>confirm('Are you sure???');</Script>");
But I want control if Ok then do wat else do wat.
Add this in the page_load method:
btnSubmit.Attributes.Add("onclick","javascript:if(confirm('Are you sure?')== false) return false;");
And then code up your normal button_Click function. On clicking the button the script confirm option appears and if No is selected processing stops, else the server side button click function is called.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.