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
  • 26,556
  • 38
  • 136
  • 291

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
  • 34,778
  • 4
  • 50
  • 65