0

I'm trying to POST a PayPal or GoogleCheckout "buy now" button from the code behind.

I got this answer telling me to add to the current html page. But the code there doesn't work as is. The code there adds a literal with the following line:

__parent.AddControl( _lit );

Which obviously doesn't work as is.

How can it be done?

Community
  • 1
  • 1
ispiro
  • 25,277
  • 32
  • 126
  • 258

1 Answers1

2

aspx

<div runat="server" id="div"></div>

codebhind

  Literal ltr= new Literal();
  ltr.Text="mytext";
  div.Controls.Add(ltr);

Working fine for me

Raab
  • 33,432
  • 4
  • 48
  • 63