Getting an absolute path from a relative one has been made very easy and pleasant by .NET. Just feed the relative path to the “Page.ResolveUrl” method and that’s it! One thing that was left out by .NET though is how to get an absolute URL from a relative path? With social networks on the rise, passing around your links has become more important than ever. There are many ways to do this, but all have their drawbacks. I will show you a static method that I use that solves just about all cases.
The task at hand is more complicated than it sounds. Normally you would just generate a button in Paypal and paste the form code to your website. If it were only that easy. Try doing this in any ASP.NET website and you will run into a big problem… no nested forms allowed!