-
Running Background Tasks in .NET Core
Introduction You may often want to run background tasks without blocking your main thread. For example, a web API that accepts a request from the client and immediately returns a response. There are various tasks that we want to execute in the background without blocking the main thread: There are various ways to run background […]
-
Asp.net Web API Help Page Customization
After you have set up the Web API help page as shown here, you could do the following customizations: List APIs by controller name Edit Areas\HelpPage\Views\Index.cshtml and replace the below line with That way, it would be easy for anyone to refer to the help page documentation, and a person can be sure that all […]
-
iTextSharp: Add dynamic header
Note: If you have not gone through my previous post iTextSharp–Add header/footer to PDF, please go through it. Most of the time, we’ll require to print the dynamic value in the header. i.e. Company Name etc. You can create properties in the PageEvent class that inherits the PdfPageEventHelper class. Now add the below code to […]
-
JQuery UI AutoComplete TextBox from Database using PageMethod in ASP.Net
In this post we’ll see how to user JQuery UI Autocomplete with asp.net pagemethod. For database, we’ll be using Northwind database. PageMethod: In above code, we’re fetching data from customer table from northwind database based on text entered by user. You may want to have this code in separate (data access) layer and must use […]
-
Jquery DataTables: Add column filter and remove global filter
Jquery DataTables plugin allows you to search through all the columns and it works pretty well. Now if you want to add a column-wise filter, you need to use the JQuery DataTables Column Filter plugin. To extend JQuery DataTables with Column Filter plugin, you need to have code like below: I’m using asp.net repeater control […]
-
iTextSharp–Add watermark to PDF
In the last post iTextSharp–Add header/footer to PDF we saw how to create a pdf with a header/footer. To add a watermark to pdf, you need to create a class that implements IPdfPageEvent as shown below code: Now let’s see how to add a watermark using the above class: After using the code above, it […]
-
iTextSharp–Add header/footer to PDF
It’s a common requirement to have a header/footer on PDF, and it could be achieved using PageEvents in iTextSharp. It depends on the requirement, but in general, the header may contain: And footer may contain the following: Check out the below function that creates a sample PDF having five pages with a header and footer: […]
-
iTextSharp–Print PDF
To print the HTML page, we use the below code. But the same can not be used to print the PDF as it won’t work. However, iTextSharp provides a way to print the PDF on the client side with the AddJavaScript method of PdfWriter. Check out the below code: It won’t print the PDF directly […]
-
Copy as path in Windows 7/8
Update: Since Windows 11, the same option is available by default in the context menu without using Shift Key, or the path can be copied using the shortcut key Ctrl + Shift + C. Many times we want to copy the complete file path, and we do that in two steps: and use a combination […]
-
jQuery multiselect plugin retain selection on postback in Asp.net
The jQuery Mutiselect plugin allows users to select multiple items from the options available in the dropdown. When we click on the dropdown, it looks something like the below : Check out the demo page of the plugin here. The problem with the plugin is that it won’t remember the user selection, and value will […]