More in this section

Forums / Developing with Sitefinity / Form tags in sitefinity

Form tags in sitefinity

6 posts, 0 answered
  1. Steven Lancaster
    Steven Lancaster avatar
    82 posts
    Registered:
    06 Nov 2009
    24 Feb 2010
    Link to this post
    I am using the following and some text in a generic content container and wondering why it does not work.

    <form method="LINK" action="/paypal.aspx">
        <input type="submit" value="Click Here" />
    </form>

    PLEASE explain why this does not work..

    THIS WORKS
    <h3> <a href="/paypal.aspx"><strong>Make A Secure Donation</strong></a> </h3>

  2. Leonard
    Leonard avatar
    19 posts
    Registered:
    01 Dec 2005
    25 Feb 2010
    Link to this post
    Hi Steven,

    The method value "link" might be the problem.

  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Feb 2010
    Link to this post
    Hi Leonard Tarteata,

    Also you should have one form in the master page and this is adding a new form inside the masterpage form. Generally you are not allowed to nest form elements and you could get invalid html as well.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  4. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    25 Feb 2010
    Link to this post
    remember that you can always use the "PostBackUrl" property in an asp.net submit button to force your form to post to an external location. You can define the standard html input fields for paypal (or whatever you might be using) and then define the postback to the paypal url. Everything else will be posted from the page, but only the relevant input items will be important to the posted page.

    hope this was helpful!
  5. John White
    John White avatar
    20 posts
    Registered:
    29 May 2010
    03 Jul 2010
    Link to this post
    Since I've just run into a need to embed a form-POST inside a generic object I started reading up on it here.  General sense here on the forums is "cannot be done that way".  This is due to the fact that ASP.NET really doesn't like multiple FORM tags, especially nested (you should see some of the whaaaa? display issues I was getting).  Renders fine in VS2008 without the Master Page but inside SiteFinity, no luck at all.

    Some further research and I ran across this article that gives very clear directions how to do a POST with no form required (builds one programmatically).  However, you will still need to create a user control (.ASCX) to implement the code-behind.

    Use HTTPWebRequest to send POST HTTP Requests to another web server

    There is a part 2 if you want to redirect to another address in addition to just sending data.  This should give you the ability to have many FORMs (virtually) sending data to many web servers on a single page -and- get it into a SiteFinity control.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Jul 2010
    Link to this post
    Hello John White,

    As  far as I remember WebPermission are required when you use WebRequest.Create. Which means that there could be a problem in Medium Trust. Here is a link to another discussion about the forms inside Sitefinity.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
6 posts, 0 answered