Tag: C#
Resolve URL functions
This snippet code is credited to Scott’s Hanselman, This Resolve URL function is used where you want to implement it on your business layer.
Methods:
#region "Image URL helpers"
public static string ResolveUrl(string originalUrl)
{ [...]
Posted: May 31st, 2009 under .NET, ASP.NET, C#.
Tags: ASP.NET, C#, Resolve URL methods
Comments: none
Convert DataTable to CSV Function
This is the class that you can use to create a CSV file from DataTable. Basically what it does is to iterate each column and row in datatable and separate them with comma.
Class/Function:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Data;
using System.IO;
using System.Text;
using System.Web;
namespace BusinessLayer
{
public class CSVBuilder
{
[...]
Posted: September 3rd, 2008 under .NET, ASP.NET, C#.
Tags: ASP.NET, C#
Comments: none