Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Submitting Forms from DNNSubmitting Forms from DNN
Previous
 
Next
New Post
11/29/2010 11:00 PM
 
Normally you can' t submit a form from a DNN page because the DNN page itself is a form and ASP.NET only allows one form per page. But Mitchel Sellers and John Mitchell describe here and here a way to get around this limitation and issue forms from DNN.  The downside is that the method submits all the inputs on the page, not just those in your form, but, they say, "typically that is not too large of an issue."

But this turns out to be a huge issue for me because one of the page inputs submitted is VIEWSTATE which is over 8000 characters. I'm submitting my form to google.com/maps and they won't accept the form, saying "Input is too large."

So I'm wondering if anyone knows a way to send forms from DNN that doesn't stick VIEWSTATE in the QueryString.

Thanks for any ideas.
Steve
 
New Post
11/30/2010 4:14 AM
 
It depends on your needs. 1)Perhaps you can use GET requests instead of POST one. (in this case when user click on buton - it send standard asp.Net POST request on your initial site, then in button handler you collect all needed data into GET request and make Response.Redirect) 2) The same actions using client js to collect data and make redirect 3) Use iframe can help but it isn't good solution 4) Use clien-side js to remove viewstate input

Team Leader
CodingStaff Development Company
Check our dnn modules and dotnetnuke skins to see where you can start.
 
New Post
11/30/2010 4:44 AM
 
the best alternative might be creating a custom module or using a generic form builder like free Helferlein Forms from www.helferlein.com

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/30/2010 2:29 PM
 
Tanya,

Thanks for replying.

I am using the Get method now.  The HTML I have at this point is:

<label for="saddr">Get directions from your address:</label>
<input type="text" id="saddr" name="saddr" />
<input type="hidden" value="2144 W. Greger St. Oakdale, CA" name="daddr" />
<input type="submit" onclick="this.form.action='http://www.mysite.info/testdirections.aspx'; this.form.method='get'; this.form.__VIEWSTATE.value=' steve'; this.form.submit();" value="Go" />

The above posts the form to a test .aspx page I've set up on another site so I can see what's coming in.  (That's how I realized I was sending the 8000+ character __VIEWSTATE.)  You can see that I am using client-side JavaScript to remove ViewState input, or at least replace it with the more manageable 'steve'.  But this doesn't help. Then 'steve' is just added to the complete __VIEWSTATE.  What I see coming into testdirections.aspx then is:

http://www.mysite.info/testdirections.aspx?__EVENTTARGET=&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE=+steve&dnn%24IconBar.ascx%24optMode=EDIT&dnn%24IconBa ...[+ another 8000 characters]

I'm not sure I understand what you're saying about "collecting all needed data into a GET request and doing a Response.Redirect."  Are you saying I could somehow take __VIEWSTATE out of the QueryString before redirecting to Google?

Steve
 
New Post
11/30/2010 3:14 PM
 
Sebastian,

There isn't enough time at this point to write a custom module (especially since I have no experience yet doing that).  I'll look into the Helferlein form builder.  Thanks.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Submitting Forms from DNNSubmitting Forms from DNN


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out