Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Distinct sendform.aspx thank you

  1. #1
    MMay is offline Junior Member
    Join Date
    May 2007
    Posts
    13

    Default Distinct sendform.aspx thank you

    Hello,

    I have a client in need of a custom thank you message shown on sendform.aspx upon form submission.

    currently i have an xmlpackage generate the form and add the products Summary as a hidden field in the form. Then sendform.aspx displays this summary as a thank you.

    this worked wonderfully until my client decided to add links and formatting to the thank you messages. Once that happened the sendform.aspx will error out on form submission, stating that some variable (the summary) contains dangerous information (html tags).

    I was wondering if there is a way to either disable this security feature, the site will never contain sensitive information. Or deliver the summary of a product in a different way which would allow links and formatting.

    thanks again.

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    Disabling the feature is a bad idea...it would allow people to submit all kinds of things through the form (some of which you wouldn't want them submitting). As an alternative, you just need to encode the Summary before submitting the form.
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    MMay is offline Junior Member
    Join Date
    May 2007
    Posts
    13

    Default

    well, after applying aspdnsf:HtmlEncode() to the summary before output to the hidden form variable the sendform.aspx no longer errors. The problem is now that it displays the html of the Summary on the page instead of the formatted summary.

    Any suggestions on how i might force sendform.aspx to properly render the formatted output?

  4. #4
    MMay is offline Junior Member
    Join Date
    May 2007
    Posts
    13

    Default

    Nevermind, i got it. Had to decode the html in the sendform.aspx.cs

    Label1.Text = Server.HtmlDecode(CommonLogic.FormCanBeDangerousContent("Summary"));//AppLogic.GetString("sendform.aspx.3", SkinID, ThisCustomer.LocaleSetting)