Render Pdf within browser
There are different ways to render Pdf in a browser. In this I’m explaining to render Pdf by fileContent/byte array. In a below example I’m using Index Action which returns the FileContentResult.
public ActionResult Index()
FileContentResult result = new FileContentResult(byteArray, “application/pdf”);
That’s it from controller side. Now you have to call you Action to get it rendered on your HTML. You can use different HTML5 tags like :
<iframe src = ‘@Url.Action(“Index”, “Home”)#zoom=150′ width = “100%” height=”525″ id=”iFramePdf” #zoom=”200″ frameBorder=”1″></iframe>
<embed src=’@Url.Action(“Index”, “Home”)#zoom=150′ width = “100%” height=”525″ id=”iFramePdf” #zoom=”200″ frameBorder=”1″ type=”application/pdf”/>
<object data=’@Url.Action(“Index”, “Home”)#zoom=150′ width = “100%” height=”525″ id=”iFramePdf” #zoom=”200″ frameBorder=”1″ type=”application/pdf”>
Hope this article will help you.
Achieve Multithreading in Java Script
On the web you may found the various ways to archive multi-threading but as far as I know, the only way is HTML5 Web Workers. You can simulate ‘concurrency’ by using techniques like
setInterval() and event handlers.
Yes, all of these features run asynchronously, but non-blocking doesn’t necessarily mean concurrency. Like
setInterval() only schedule things to happen later, they don’t run concurrently with anything else. Before multithreading when executing scripts in an HTML page, the page becomes unresponsive until the script is finished.
Continue reading “How to achieve multithreading in Java Script”
Want to export the data to excel, but don’t want to hit server again and again ?? So here is the simple way out for you.
In the following steps you will understand how simply we can export the data to excel sheet by using jquery.
Continue reading “Export to excel table without hitting server using Jquery”
Local Storage and Session Storage
Before HTML5, application data of web applications are stored in cookies. In this article I will explain you what is Local Storage and Session Storage Object, How we can use it our application, What is the difference between Local and Session Storage object. Why HTML Local Storage better than cookies. So lets start with What .
Continue reading “HTML5 Local Storage and Session Storage”
What is Mailto Link ???
Mailto link is basically a type of HTML link that opens a new mail window by activating the default mail client installed in your PC .
- Now let us suppose you want to send mail to a single person using mailto link then you have to write code as :
Continue reading “How to use Mailto link in HTML”