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:
Protected WithEvents C1AddToCart1 As C1.Web.C1PayPal.C1AddToCart Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click C1AddToCart1.CurrencyCode = C1.Web.C1PayPal.CurrencyEnum.USDollars C1AddToCart1.Business = "******@hotmail.com" C1AddToCart1.ItemName = "Test Item" C1AddToCart1.ItemNumber = "0010001" C1AddToCart1.ItemPrice = 15.95 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




Reply With Quote