QueryString Not Accesible from the Server (Please Respond)

P

pbd22

Hi.

I have HTML on my form that was constructed on the server.
The "browser" is a PopUp that was previously fired from another page.
This popup is a standard browser pop-up,
nothing fancy or unique.

There are two forms inside the pop-up:

They both have javascript buttons on them that submit the form. The
submit constructs a querystring that gets sent to the server. When i
look at it on the server, Length is always 0.

What am i doing wrong?

I have tried this using an input button with type=submit also and i
still get length = 0.

One of the two forms is as such:

<form action='view_webinar_free.aspx' name='view_webinar_free'
id='view_webinar_free'><div class='formButtons'><a
href='javascript:submitviewer();' class='textBtnRed
formBtn'><span>View Webinar</span></a></div></form>


Bot forms and enclosing HTML is below:







<div class="mod1Col">
<div class="shbox">

<div class="sh1">
<div class="sh2">
<div class="box">
<!-- BEGIN HEADER -->
<div class="modHeader deepPurpleBG">
<h2>View webinar</h2>
</div>
<!-- END HEADER -->

<!-- BEGIN MODULE CONTENT-->
<div class="modBody modHeight160">
<div class="modCopy">
<p>Click on the button below to access the webinar.</p><form
action='view_webinar_free.aspx' name='view_webinar_free'
id='view_webinar_free'><div class='formButtons'><a
href='javascript:submitviewer();' class='textBtnRed
formBtn'><span>View Webinar</span></a></div></form>
</div>
</div>
<!-- END MODULE CONTENT-->
</div>
</div>
</div>
</div>

<div class="shbox">

<div class="sh1">
<div class="sh2">
<div class="box">
<!-- BEGIN HEADER -->
<div class="modHeader deepPurpleBG">
<h2>Login to the presenter</h2>
</div>
<!-- END HEADER -->

<!-- BEGIN MODULE CONTENT-->
<div class="modBody modHeight360">
<div class="modCopy">
<p>Click on the button below to access the presentation
interface.</p><br /><form action='presenter_interface.aspx'
name='presenter_interface?music=love&travel=love&sports=love'
id='presenter_interface' ><ul><li><label>Email:</label><input
type='text' class='input_small' id='oEmail' /></
li><li><label>Password:</label><input type='password'
class='input_small' id='oPass' /></li></ul><div class='formButtons'><a
href='javascript:submitpresenter();' class='textBtnRed
formBtn'><span>Login</span></a></div></form>
</div>
</div>
<!-- END MODULE CONTENT-->
</div>
</div>
</div>
</div>

</div>
 
B

bruce barker

you don't show the javascript that actually submits, but the form action
(postback url) doesn't have any query string arguments.

-- bruce (sqlwork.com)
 
P

pbd22

Thanks for the reply bruce,

Even if I put querystring arguments there, it doesn't do anything.
For example, if the HTML looks like this, it doesn't help:

<form action='view_webinar_free.aspx?one=hello&two=hello&three=hello'
name='view_webinar_free'
id='view_webinar_free'><div class='formButtons'><a
href='javascript:submitviewer();' class='textBtnRed
formBtn'><span>View Webinar</span></a></div></form>
 
P

pbd22

Jeff,

I am not sure what you are trying to illustrate with the link you
provided but i get a 404 error when i
try to click on it.

Thanks,
Peter
 
J

Jeff Dillon

I did not provide a link. Form POSTs do not send a query string. Look up
POST versus GET
 
P

Peter Bromberg [C# MVP]

If i make a form post and there are items on the querystring, are you saying
that they won't be there if I parse the querystring? I think not. A url is a
url. If it has items on the querystring, they are available to the developer
regardless of what the HTTP verb is. With a POST you would also have a
NameValueCollection of post name / value pairs, but that doesn't mean the
querystring isn't there.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
 
P

pbd22

the problem was that i omitted the method= in my form tag.
now that i see what you were say jeff, yes, i have to agree
with peter - you most certainly "can" get the querystring
logic with a get and post.

regardless, thanks to all for the perspectives.
 
J

Jeff Dillon

I didn't say that, or perhaps I mispoke. I assumed the OP was looking for
POST'd data in the query string, which is incorrect

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top