Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 16th, 2003, 03:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default Request.Form rtns NULL when I KNOW it has a value!

I'm trying to pass a datetime in a hidden field across several forms because it's a PITA to pass in the URL. It's passed OK from the first to the second. In the second I request the value from the first form and put it in another hidden field. I've checked the value just after setting the field on the second form and it IS there. But when it gets to the third form, the request returns an empty string.

I know the field name is correct in all places - in fact it's identical. And the field appears inside the form, as well. All the forms involved have method="POST".

Do you have any clues for me why this value isn't available when it gets to the third form?
 
Old July 22nd, 2003, 09:19 PM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default

Hi,

Can you paste your code here?

Cheers!
Marlon
 
Old July 22nd, 2003, 09:22 PM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default

Oh yeah, I forgot to mention...

I tried your scenario and I got to pass a hidden datetime value to a third page by removing the runat="server" attribute from the <form> element. However, you can still access individual web controls inside the form through codebehind if they have the runat attribute.

Cheers!
Marlon
 
Old July 24th, 2003, 07:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Marlon,

The third page did indeed contain runat="server" - I thought it was necessary because this code updates a SQL Server DB. Because I couldn't get it to go as designed and needed to get past this problem quickly, I resorted to yet another work around. I'll give your suggestion a try the next time I try to do something this way. Thanks for your response!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Request.Form / Request.QueryString Toran Classic ASP Databases 4 January 17th, 2007 02:23 PM
request.form() lucian Dreamweaver (all versions) 1 November 7th, 2004 09:14 AM
request.qurystring vs. request.form Durwood Edwards Classic ASP Databases 3 June 18th, 2004 12:09 AM
request.querystring() , request.form() alyeng2000 ASP.NET 1.0 and 1.1 Basics 1 December 30th, 2003 12:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.