Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Re:Creating dyanmic form tag i.e. at run time

Re:Creating dyanmic form tag i.e. at run time

Scheduled Pinned Locked Moved Web Development
javascriptbusinesstoolstutorialworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sql Exciter
    wrote on last edited by
    #1

    Hi to all, I have one class. That i have to convert to Custom control. Just I took one webcontrol library .For that i have to create form tag at runtime.How to write javascript for that. The following is my class. Check the PayNow() and answer me.

    public string PayNow()
    {
        //construct script for paypal submission
        //construct a form with all hidden variables and say form.submit()
        string modify = string.Empty;
        if (CanUserModifySubscription)
            modify = "1";
        else
            modify = "0";
        StringBuilder paypalJavascript = new StringBuilder();
        if (SubmitPaypal)
        {
            
    
            paypalJavascript.Append("
    
            if (EnableSandboxMode)
                paypalJavascript.Append(SandboxUrl);
            else
                paypalJavascript.Append(PaypalUrl);
            paypalJavascript.AppendLine(">");
            paypalJavascript.AppendFormat("{2}", "cmd", Command, Environment.NewLine);
            if (EnableSandboxMode)
                paypalJavascript.AppendFormat("{2}", "business", SandboxBusinessEmail, Environment.NewLine);
            else
                paypalJavascript.AppendFormat("{2}", "business", BusinessEmail, Environment.NewLine);
            paypalJavascript.AppendFormat("{2}", "item\_name", SubscriptionItemName, Environment.NewLine);
            paypalJavascript.AppendFormat("{2}", "item\_number", SubscriptionItemNumber, Environment.NewLine);
            paypalJavascript.AppendFormat("{2}", "no\_shipping", "1", Environment.NewLine);
            paypalJavascript.AppendFormat("{2}", "return", SuccessUrl, Environment.NewLine);
            paypalJavascript.AppendFormat("{2}", "cancel\_return", CancelUrl, Environment.NewLine);
            if (TrialSubscriptionPeriod != 0)
            {
                paypalJavascript.AppendFormat("{2}", "a1", TrialSubscriptionAmount.ToString("0.00"), Environment.
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups