TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
miroslav nikolic
NA
10
5.1k
show javascript alert after send pdf file to client
Nov 27 2014 5:20 PM
I have Javascript in web form I want to send alert to client after send file but it is dosn't work .I can send pdf file but alert dosn't show I hope somone can help thanks in advance
<script type = "text/javascript">
function Confirm() {
alert("pdf document is send to you");
}
</script>
code:
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Racun.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter stringWriter2 = new StringWriter();
HtmlTextWriter htmlTextWriter2 = new HtmlTextWriter(stringWriter2);
GridView1.RenderControl(htmlTextWriter2);
StringReader sr2 = new StringReader(stringWriter2.ToString());
Document doc2 = new Document(PageSize.A4, 10f, 10f, 10f, 00f);
HTMLWorker htmparser = new HTMLWorker(doc2);
PdfWriter.GetInstance(doc2, Response.OutputStream);
doc2.Open();
htmparser.Parse(sr2);
doc2.Close();
GridView1.DataBind();
Response.Write(doc2);
Response.End();
ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Confirm();", true);
Reply
Answers (
2
)
Error Raise when i try to implement Entity Framewor in 3Tier
Hashing fields prior to form post