• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

use of private & public in ASP

what's the use of private and public variables in ASP? i know their meaning in VB but can't understand in active server pages. i will appreciate if you give an example.
best regards...
0
omavideniz
Asked:
omavideniz
  • 4
1 Solution
 
omavidenizAuthor Commented:
Edited text of question.
0
 
freshmeatCommented:
?
never heard about such type variables in ASP
interesting, i wanna know more
:)
0
 
omavidenizAuthor Commented:
i'm confused a little. i'm asking about private and public var types in VBScript. i don't find any use of them...
0
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

 
omavidenizAuthor Commented:
Adjusted points to 100
0
 
omavidenizAuthor Commented:
Adjusted points to 150
0
 
myucelCommented:
declaring a variable in vbscript as private prevents other jscript codes to get it's value.

but declaring it as public enables jscripts to get this variable to work with.

so public & public are only take use of it between vbscript to jscripts...

<SCRIPT LANGUAGE=VBS>
public var1
private var2
</SCRIPT>

<SCRIPT LANGUAGE=JSCRIPT>
var1 = 10
var2 = 12  // error, undeclared var...
</SCRIPT>
0

Featured Post

SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

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