Web Utility For ASP.Net
Rendering data/reports comes with a lot of approaches that depend on the client's needs. These pieces of codes can simplify your work.
The solution has a project, WEB.UTIL which contains the ff classes/functions:
- GetIPAddress - Gets your client's IP.
- ToDataTable - Converts your List<>, .txt file, string to DataTable
- DataTableExtensions - Serves as extended property for your DataTable
- WriteToCSVFile - Exports your DataTable to CSV (with file destination)
- DownloadToCSVFile - Converts/Downloads CSV from DataTable
- DownloadTxtFile - Converts/Downloads Txt from DataTable (xml is needed to define the format)
- GetText - Reads the DataTable and converts records into string (xml is needed to define the format)
- ExportToPDF - Converts/Downloads PDF from DataTable
- WriteToPDF - Exports your DataTable to PDF (with file destination)
- Upload - upload any file via FTP
- ReadTxt - Reads a txt file from FTP and return the string
- ClearForm - clears the textbox, checkbox, etc from a page
By referencing WEB.UTIL you get such functions that'll get the job done and will surely minimize your code.
Got more questions? Please see the
**This is intended for sharing purposes only. Some functions may not be appropriate to you. You may change/delete/correct the names, logic, and etc that'll suit your needs.