Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Accessing Javascript variable data from ASP

Reply
Thread Tools

Accessing Javascript variable data from ASP

 
 
Rags
Guest
Posts: n/a
 
      04-06-2004
Hi

This is Rags, I want know how can we access the a
Javascript variable value from the ASP code..(At the
server side)

<%
Dim mItemcode
%>
<SCRIPT>
var item
item='My Item';
</SCRIPT>

In the above example, I want how can i access item variable
(javascript) value into the asp variable mItemcode

regards
rags
 
Reply With Quote
 
 
 
 
William Morris
Guest
Posts: n/a
 
      04-06-2004
Rags, you can't get there from here. Javascript is a client-wide
technology, ASP is server side. The only way to pass your values to an asp
variable is through a querystring:

document.location="mypage.asp?item1=shirt&item2=so cks&item3=shoes"

or through a form:

<form action="mypage.asp" method="get">
<input type=hidden name=item1 value="shirt">
<input type=hidden name=item2 value="socks">
<input type=hidden name=item3 value="shoes">
</form>

Once either happens, you can then process the values any way you like.

"Rags" <(E-Mail Removed)> wrote in message
news:190d401c41bf5$97d56a60$(E-Mail Removed)...
> Hi
>
> This is Rags, I want know how can we access the a
> Javascript variable value from the ASP code..(At the
> server side)
>
> <%
> Dim mItemcode
> %>
> <SCRIPT>
> var item
> item='My Item';
> </SCRIPT>
>
> In the above example, I want how can i access item variable
> (javascript) value into the asp variable mItemcode
>
> regards
> rags



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a variable value from Javascript to asp.net server variable shil ASP .Net 2 01-02-2007 09:33 PM
passing data from javascript variable to asp variable. Steve Cosh ASP General 1 11-18-2005 04:15 AM
how to get javascript variable value into asp variable tnhoe Javascript 4 04-21-2005 06:32 PM
passing javascript variable into asp variable using vbscript Jonas Daunoravicius Javascript 5 07-17-2003 04:54 AM
passing javascript variable into asp variable using vbscript Jonas Daunoravicius ASP General 5 07-17-2003 04:54 AM



Advertisments