473,395 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

passing post parameters having space in them

<%

name = request.Form("name")
response.Write "hello " & request.Form("name")

' if name is empty then store some string with space in it
' problem is the word before space 'mr' is passed, but 'programer' is not
passed

if len(name)=0 then
name = "mr programmer"
end if

%>

<form name="test" action="demo.asp" method="post">
<input type=hidden name="name" value=<%=name%> >
<INPUT type="submit" value="Demo" name="Submit">
</form>

------------------------------
Output
------------------------------
hello

on clicking Demo button

hello mr
Jul 22 '05 #1
1 1865
Think of what it looks like in the browser (or do a view-source)

<input type=hidden name="name" value=mr programmer >

Now, what if it were

<input type=hidden value=mr programmer name=name>

What's the value? mr programmer? mr programmer name? mr programmer
name=name?

You need to use quotes to encaspulate your value.

<input type="hidden" name="name" value="<%=name%>">

Ray at work
"ramata" <ra****@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
<%

name = request.Form("name")
response.Write "hello " & request.Form("name")

' if name is empty then store some string with space in it
' problem is the word before space 'mr' is passed, but 'programer' is not
passed

if len(name)=0 then
name = "mr programmer"
end if

%>

<form name="test" action="demo.asp" method="post">
<input type=hidden name="name" value=<%=name%> >
<INPUT type="submit" value="Demo" name="Submit">
</form>

------------------------------
Output
------------------------------
hello

on clicking Demo button

hello mr

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mark | last post by:
hello! I have a class method that takes a variable number of parameters and correctly deals with them with func_get_args, etc ... i.e. class ABC { public function MooSaysTheCow()
3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
12
by: Joel | last post by:
Hi all, Forgive me if I've expressed the subject line ill. What I'm trying to do is to call a c++ function given the following: a. A function name. This would be used to fetch a list of...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
2
by: Morgan | last post by:
Thanks to all of you because I solved the problem related with my previous post. I simply made confusion with pointers to pointers and then succeeded passing the reference to the first element...
12
by: scottt | last post by:
hi, I am having a little problem passing in reference of my calling class (in my ..exe)into a DLL. Both programs are C# and what I am trying to do is pass a reference to my one class into a DLL...
1
by: fyreblaize | last post by:
I'm having trouble passing an array of strings to a function. all i'm doing is loading in 5 names, then printing them out. compiles fine, but when i run, i get an error (im guessing its associated...
2
by: william.w.oneill | last post by:
I have an application that takes a few command line parameters. As recommended by others in this group, I'm using a named mutex to ensure that only one instance of the application is running. My...
40
by: Angus | last post by:
Hello I am writing a library which will write data to a user defined callback function. The function the user of my library will supply is: int (*callbackfunction)(const char*); In my...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.