Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
On button click i have some linking from database and after that show confirm box..
Posted
Comments
Oshtri Deka 24-Mar-12 6:42am    
Please improve your question. I doesn't have sense.
Do you want confirm message before some DB operation? Or after? Or something else?!
puneetisonfire89 24-Mar-12 6:57am    
sir firstly i want to validate some functions from database and after that i want to show confirm box.

Hi,

Try Using This,

ASP.NET
<asp:imagebutton id="imgDelete" cssclass="gridIcon" runat="server" imageurl="~/Images/delete.gif" ommandname="Delete" tooltip="Delete" onclientclick="return confirm('Are you sure that you want to delete this record?');">                                                                   </asp:imagebutton>


Hope This May Help You..
 
Share this answer
 
v2
Hi,

you can use javascript or jquery ajax for that.

jquery ajax as follows

$.get("Example.aspx?parameter1=1¶meter=2¶meter3=3, function(response) {
	               if(response!=null)
	               {
	               alert("Give yor msg here...");
confirm("msg"); 
	               }
	                        
	                    });


coding in Example.aspx.cs page in page load

Response.Expires = -1;
        //required to keep the page from being cached on the client's browser
        string retResponse = String.Empty;

        
            string str= Request["parameter1"].ToString();
            string str1= Request["parameter2"].ToString();
            
            retResponse = functionName(str, str1);

        Response.ContentType = "text/plain";
        Response.Write(retResponse);
        Response.End();
 
Share this answer
 
v2
Comments
puneetisonfire89 24-Mar-12 8:36am    
no sir,i want to call confirm box, between the page.. that is in aspx.cs page

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900