Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing ASP variables in VB script

Status
Not open for further replies.

YvonneTsang

Programmer
Sep 28, 2001
37
CA
Is there a way to edit ASP variables in VB script? I know you can read the values of teh ASP variables with <%=variable%> but is there a way to set ASP variables?
 
I meant to say is there a way to set an ASP variable to the value of a VB script variable in VB Script.
 
Yes variables, as opposed to constants, can have variable values, and thus they can be changed:

<%
Dim number
Dim text

number = 5
text = &quot;Place variable content here&quot;
%>

Palooka
 
You may misunderstood my question.

I have a vbscript value say called VBvalue and I have an ASP value called ASPval. How do I assing VBvalue to ASPvalue in VBscript.

would it be something likke

VBvalue = 5
<%ASPvalue =%> = VBScript

 
Uhm, okay. :)

What do you mean by ASP value? Could you give a real example?

After all, ASP is not a language in itself - more like a definition of standards. Are you thinking of javascript values?

Palooka
 
The problem is not posed well.
First we have the execution of ASP in the server.
The output of ASP is posted as html, javascript and vbscript to the client. In the client is executed only client scripts such as javascript and vbscript.
ASP is not present, at this moment.
Therefore, ASP cannot change at this moment the scripts.

But before the compilation in the server we can have the code

<script language=&quot;vbscript&quot;>
sub asub
Dim a
a=<%=anASPvariable%>
..
end sub
</script>
 
I have obviously missed something vital here. I've never even heard of this. (We're not talking about &quot;run on server&quot; vbscript, are we?)

Does anyone have an example including the use of an ASPvariable? Not a &quot;made-up&quot; one, but a real one, that does something.

Thx,
Palooka
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top