Click here to Skip to main content
15,789,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created ashx handler with dropzone.js to upload file, i need to show the messagebox in ashx handler. can anybody tell me how do it ?

What I have tried:

context.Response.Write("<script type='text/javascript'>alert('File Uploaded successfully..!!');</script>"); 

and also tried
var msg = string.Format(@"<script language='javascript'>alert('your text here');</script>");

but still it is not showing any alert box.
Please help me
Updated 12-Mar-17 22:19pm

1 solution

Check out this solution. hope it helps
string script = "<script type=\"text/javascript\">alert('alertmessagehere');</script>";
  ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", script);
Share this answer
Dnyaneshwar Sable 13-Mar-17 7:02am    
No man this is not working
M,AqibShehzad 13-Mar-17 8:53am    
Is this showing any error in console or in cs file. can you share the full code

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