Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

Using server side variable from client side

I'm declaring the following in my globa.asa:

Dim x
Set Application("x") = Server.CreateObject("COMSYS.clsCOMSYS")
End Sub

Then I'm using x in my ASP pages as follows:

<%Var = Application("x").SomeMethod%>

However what I want to do is use x on the client side, but I'm confused as to what to do if my method has an argument.

For example, if i declare x on the server side of an ASP page as follows:

<%Var = Application("x").Method%>

Could i then just bring it over to the client side like this:

AgreementSearchResult = <%=AgreementSearchResultServer%>

Would this work??????

What about the argument though, what is the syntax:

AgreementSearchResult = <%=AgreementSearchResultServer.Argument%>

Looking forward to your help,

Matt.




0
Matt_Unsworth
Asked:
Matt_Unsworth
1 Solution
 
thunderchickenCommented:
I don't see why this wouldn't work.

ASP is compiled before client code is, so all you do is spit out your variable.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now