Solved

read input value by asp

Posted on 2002-07-18
11
493 Views
Last Modified: 2008-03-03
hi

how i can read data from input box value in asp
not by using "submit"
just in the same page

somthing like that in vbscript:

Vr = myformname.textname.value
how i can do this statment in ASP

ASAP
plz
0
Comment
Question by:issamtaher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
  • 2
  • +1
11 Comments
 
LVL 4

Expert Comment

by:AlonHirsch
ID: 7161865
Hi,

You can not perform this in ASP.
ASP is Server side code and HTML is Client Side.
The only way you can get Client Side information to the Server Side (ASP) is by submitting the form.
On the Server Side (ASP) there is only text files (.asp etc.) that need to be processed by the server.
When a user requests a page, the server processes the .asp page and build HTML to send back to the Client (browser).

HTH,
Alon
0
 
LVL 1

Author Comment

by:issamtaher
ID: 7161873
so  AlonHirsch and all

how i can read URL parameter in asp
www.mypage.com ? Id=100 & Name=ttt

how i can read Id and Name

somthing like location.search in VBscript

thx alot
0
 
LVL 8

Expert Comment

by:drittich
ID: 7161893
Dim sID, sName
sID = Request.QueryString("Id")
sName = Request.QueryString("Name")
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 1

Author Comment

by:issamtaher
ID: 7161896
so  AlonHirsch and all

how i can read URL parameter in asp
www.mypage.com ? Id=100 & Name=ttt

how i can read Id and Name

somthing like location.search in VBscript

thx alot
0
 
LVL 4

Accepted Solution

by:
AlonHirsch earned 250 total points
ID: 7161898
Hi,

If your URL is http://www.mypage.com?Id=100&Name=ttt
(no spaces!!!) then in the ASP page you would read the ID and Name as follows :
<%
   ' declare variables to store the ID and Name (variants)
   dim vID
   dim vName

   ' get the ID from the URL
   vID = Request.QueryString("ID")
   vID = Request.QueryString("Name")
%>

If you are posting the variables from within a FORM on the HTML, you would use Request.Form instead of Request.QueryString

HTH,
Alon
0
 
LVL 1

Author Comment

by:issamtaher
ID: 7161902
so  AlonHirsch and all

how i can read URL parameter in asp
www.mypage.com ? Id=100 & Name=ttt

how i can read Id and Name

somthing like location.search in VBscript

thx alot
0
 
LVL 1

Author Comment

by:issamtaher
ID: 7161917
so  AlonHirsch and all

how i can read URL parameter in asp
www.mypage.com ? Id=100 & Name=ttt

how i can read Id and Name

somthing like location.search in VBscript

thx alot
0
 
LVL 1

Author Comment

by:issamtaher
ID: 7161920
thaks alot
0
 
LVL 1

Author Comment

by:issamtaher
ID: 7161924
thanks alot sir
0
 
LVL 2

Expert Comment

by:chops123
ID: 7161953
Although this isnt possible using ASP,its quite possible using a client side script like VBScript or Javascript.

You can do something like this..

<SCRIPT LANGUAGE=VBScript TYPE="text/vbscript">
   makeMsgBox = InputBox("Enter Name !","Title","")
   msg = "Hi " & makeMsgBox & " how are you !"
   document.write msg
</SCRIPT>


Regards
KC
0
 
LVL 8

Expert Comment

by:drittich
ID: 7161982
Two things:

1) I answered prior to Alon..., and
2) If you are using his code, change

vID = Request.QueryString("Name")

to

vName = Request.QueryString("Name")
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html CheckBox obtain Its Value 5 43
asp classic find word in string and get its value 7 48
Read text on Table 7 46
Add Rows on a Table 8 51
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question