473,769 Members | 6,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing variables

Hi all

I'm trying to pass two variables, but what is wrong with my code?

--------
<form name="uno"
action="validat e.asp?Num=<%=Re quest.Querystri ng("Num") %>"
method="post">

<textarea name="komm" cols="90" rows="4" id="komm"></textarea>
--------

When it click the below "image" everything is ok!

<input name="imageFiel d" type="image" src="next.jpg">

But way can't I use the below method? It only passes the querrystring
NOT the value in the textbox

<a href="validate. asp?Num=<%= Request.Queryst ring("Num")%>"
title="next">ne xt</a>

I also tried below but getting syntax errors

<a href="proceed.a sp?Num=<%= Request.Queryst ring("Num")%> &val=<
%Request.form(" komm")%>"
</form>

Thanks in advance
Jul 19 '05 #1
3 3461
On Mon, 29 Mar 2004 14:02:00 GMT, Kim Lots <no****@forme.c om> wrote:

Sorry typing error - below my corrected question to the NG
Hi all

I'm trying to pass two variables, but what is wrong with my code?

--------
<form name="uno"
action="valida te.asp?Num=<%=R equest.Querystr ing("Num") %>"
method="post ">

<textarea name="komm" cols="90" rows="4" id="komm"></textarea>
--------

When it click the below "image" everything is ok!

<input name="imageFiel d" type="image" src="next.jpg">

But way can't I use the below method? It only passes the querrystring
NOT the value in the textbox

<a href="validate. asp?Num=<%= Request.Queryst ring("Num")%>"
title="next">n ext</a>

I also tried below but getting syntax errors

<a href="validate. asp?Num=<%= Request.Queryst ring("Num")%> &val=<
%Request.form( "komm")%>"
</form>

Thanks in advance


Jul 19 '05 #2
Kim,

The syntax error is probably due to the fact that the snippet of code

<%Request.form( "komm")%>

should actually be <%=Request.form ("komm")%>
When you post a form, it posts ALL the input fields defined within the
domain of that form element. When you do:

<a href="validate. asp?Num=<%= Request.Queryst ring("Num")%>"
title="next">ne xt</a>

You are passing values one by one. Just add more values to your link:

<a href="validate. asp?Num=<%=
Request.Queryst ring("Num")%>&K omm=<%=Request. Querystring("Ko mm") %>"
title="next">ne xt</a>

Hope that helps.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Kim Lots" <no****@forme.c om> wrote in message
news:qr******** *************** *********@4ax.c om...
Hi all

I'm trying to pass two variables, but what is wrong with my code?

--------
<form name="uno"
action="validat e.asp?Num=<%=Re quest.Querystri ng("Num") %>"
method="post">

<textarea name="komm" cols="90" rows="4" id="komm"></textarea>
--------

When it click the below "image" everything is ok!

<input name="imageFiel d" type="image" src="next.jpg">

But way can't I use the below method? It only passes the querrystring
NOT the value in the textbox

<a href="validate. asp?Num=<%= Request.Queryst ring("Num")%>"
title="next">ne xt</a>

I also tried below but getting syntax errors

<a href="proceed.a sp?Num=<%= Request.Queryst ring("Num")%> &val=<
%Request.form(" komm")%>"
</form>

Thanks in advance

Jul 19 '05 #3
Hi

I don't know where to start but firstly you where
right abt the snippet of code should of course be

<%=Request.form ("komm")%>

As I said I have a 2 form objekts on page 1 like this

<form name="uno"
action="valida te.asp?Num=<%=R equest.Querystr ing("Num") %>"
method="post ">


and

<textarea name="komm" cols="90" rows="4" id="komm"></textarea>

When the user writes something in the text field I would like to grab
this
info on page 2.

So when they click on:

<input name="imageFiel d" type="image" src="next.jpg">

Everything is working fine!

But when they click on the following link as an alternative:

<a href="validate. asp?Num=<%= Request.Queryst ring("Num")%> &komm=<
%=Request.form( "komm")%>"

The komm variable is empty when arriving on page 2?

Okey! I can live with that. That's how things work. Page 1 is
dynamically written and I'm not using POST to pass the info.

But the user input is there somewhere? I'm I right? So I tried
several things on page 2 to grab the info. For instance:

<% Request.form("k omm")%> No good!
<% Request.Queryst ring("komm")%> The variable is of course empty!
<% Session(Request .form("komm"))% > Nothing!

Just to clarify. What I'm trying to do is completely impossible with
ASP 3.0?

Thanks for you reply

Jul 19 '05 #4

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

Similar topics

4
3601
by: Amr Mostafa | last post by:
Hello :) I'm trying to write a script that deals with a web service. I'm using NuSoap class. my question is : Can I pass some variables By Reference to the web service and get the result back in my variables ?? note1: I'm not the one who wrote the web service.. so I can't modify
4
8536
by: Jason Us | last post by:
Does anyone have experience with passing variables from an ASP page to a JSP page. The way it currently works in passing the SSN in the URL. This cannot be good. I thought that storing a unique session ID in a cookie and referencing the SSN from the Session ID would be the correct way to do this. But since we have two separate servers, IIS and Websphere, how do we coordinate the session ID?
3
14949
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) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
5
6701
by: Jack | last post by:
Hi, I need to pass multple variables in a link in order to go to a asp page with the two varables. The following are the values of the variables using response.write: <%'Response.Write Mypage & "<br>"%> Exp <%'Response.Write GrantID & "<br>"%>
58
10179
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of code... TCHAR myArray; DoStuff(myArray);
20
1998
by: Gregory Piñero | last post by:
Hey guys, would someone mind giving me a quick rundown of how references work in Python when passing arguments into functions? The code below should highlight my specific confusion: <code> bool1=True lst1= def func1(arg1): arg1.append(4)
6
3255
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A query-string flag is used to indicate to the page whether it should instantiate a new instance of the object or access an existing instance from the calling page. On the both pages I have a property of the page which is an instance of this custom...
3
1572
by: Lee | last post by:
Hi All How can I pass options from one webpage into another webpage. When the user clicks on the hyperlink I want them to be go to the next page but I need to pass in a number that the next page needs to reference. Thanks Lee
12
2685
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
6
2198
BezerkRogue
by: BezerkRogue | last post by:
This is the most fundamental action I am sure, but I can't seem to make it happen. I am familiar with passing variables in ASP. But that doesn't seem to be the preferred method in .NET. I have some scripts that run at the server for the form so I can't disable that statement. I followed Microsoft's instructions(I know..not the best thing to do) but still can't get the variables to pass. I created a class and set up an @reference...
0
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.