Post value with space in it from one asp page to another

Hey all! I need to know if there is a way to post a value that has a space in it (i.e. Corporate Finance) from one asp page to another? I am pulling the values out of DB2 tables and based off of what the user selects on the first frame determines what is populated in the second frame and so on. The problem I am running into is if the value that is selected in the frame has a space in it, the value is being truncated at the spacel; therefore, causing the next frame to not display values that correspond to the value that was selected. Here is what my post looks like in asp:

(i.e. Response.Write "<option value=" & rs.Fields.Item(0) & ">" & rs.Fields.Item(0) & "</option><br>")

(i.e. Response.Write "<input type='hidden' value='" & Request.Form("Areas") & "' id='Areas' name='Areas'>").

Thanks in advance!

:cool:You can just call it.


Request.form("fieldName") and it will decode the data from the posted page.Are you saying to change Request.Form("Areas") to Request.Form("fieldname")? If so, I have already tried this and it does not work. It is still truncating the values that contain a space. Is there not some way you can post the entire value with the use of quotes? Thanks!!not it was an example... name it "Areas" as before but was a generic sample of code for that purpose

it should truncate it. I would double check how youa resetting the value of that field and the data in it.So, in order for the entire value to be posted, I will have to replace the space with some character that will connect the words together (i.e. an underscore)? Thanks!No you do not have to. I would double check that it is the data is actually in the field. Because it should work.Okay, I have tried everything I know how to. I have tested my post statement out by selecting a value called Corporate Finance. I did a Response.Write statement on the next frame to see if the entire value is being posted and it is not, only Corporate in being passed. Please help!! My statement is as follows (Areas is the fieldname):

Response.Write "<input type='hidden' value='" & Request.Form("Areas") & "' id='Areas' name='Areas'>"I would double check that the page that is posting the data to the next actually has the data by alerting it during submit.

onclick="alert(document.forms[0].fieldname.value);"I added the onclick event into one of my asp pages and if I select Corporate Finance, what automatically displays is Corporate in the alert box. What does this mean?Yea!!! I finally figured it out! I had to insert a single quote (ASCII character) before and after the string value so that the entire value would be posted to the next frame. Here is what I had to do:

Response.Write "<option value=" & Chr(39) & rs.Fields.Item(0) & Chr(39) & ">" & rs.Fields.Item(0) & "</option><br>"

This was so simple yet so confusing! Thanks for your help in trying to figure this out!

:Dthat should have to be done. you have crlf in the option? cause otherwise it shouldn't be like that.
 
Back
Top