|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hidden field looses value after submit
Hi All,
I have : document.forms[0].Update.value='yes'; document.myForm.submit; in a routine. I have declared a Hidden field called Update in my form. I have checked before the submit that the value does actually get set, but after Submission the value of Update is empty. I have checked everywhere and this is the only place in the page that this value is set. Does anybody have any idea why my value is being lost on submit. My form is declared : <FORM NAME="myForm" action="AgentDetail.asp" method="post"> |
|
#2
|
|||
|
|||
|
i dunno anything about javascript but do you actually have a hidden form field?
eg, Code:
<input type="hidden" name="update" value="yes"> it would just occur to me that if you don't then you can't really set a value for it using javascript. |
|
#3
|
|||
|
|||
|
On form submission, your viewstate will be lost. In order to keep the value, you could pass it into the querystring from the hidden form field. When that is done, just extract it from the querystring.
The other alternative is to use Request.Form("fieldname") Either should work. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Hidden field looses value after submit |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|