oop - Easier way to define properties in classic ASP? -


for every property in class in asp code have use this:

public property itemsonpage()     itemsonpage = m_itemsonpage end property  public property let itemsonpage(inp)     m_itemsonpage = inp end property 

this example itemsonpage property. there other way use subroutine somehow? tried using:

sub subclassproperty(varproperty) execute("public property " & varproperty & "()") execute(varproperty & " = m_" & varproperty) execute("end property")  execute("public property let " & varproperty & "(inp)") execute("m_" & varproperty & " = inp") execute("end property")  end sub 

but sub can not call class :-((

i believe use public statement, bit simpler syntax.

http://msdn.microsoft.com/en-us/library/72bd95z8%28v=vs.85%29.aspx

this illustrates simple example

http://www.4guysfromrolla.com/webtech/092399-1.2.shtml


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -