I found this great component on component 1 that does paypal for VB.net. The problem lies when I try to make it work in the code. This is what I have.

VB Code:
  1. Protected WithEvents C1AddToCart1 As C1.Web.C1PayPal.C1AddToCart
  2.  
  3. Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
  4. C1AddToCart1.CurrencyCode = C1.Web.C1PayPal.CurrencyEnum.USDollars
  5.         C1AddToCart1.Business = "******@hotmail.com"
  6.         C1AddToCart1.ItemName = "Test Item"
  7.         C1AddToCart1.ItemNumber = "0010001"
  8.         C1AddToCart1.ItemPrice = 15.95
  9. end Sub

But when I press the button I get an Object Reference not set to an instance of an object:

This is the stack trace
[NullReferenceException: Object reference not set to an instance of an object.]
WebApplication1.basic_customize.btnSubmit_Click(Object sender, EventArgs e) in C:\Documents and Settings\Cran56\VSWebCache\dirteelinens.com\basic_customize.ascx.vb:119
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277

I have no clue why it's having a problem.

Thanks,
Cran56