Our Web
How URL Maps to Code
The URL maps directly to one prg and one function inside that prg,
whether you use the LAFox standard or the Web Connect Standard
LAFox URL Standard (3-parts)
www.LAFOX.org/Home.Page.fox?SessionID=_72A1068MC
Home
= Home.prg contains our code for this URL.
www.LAFOX.org/Home.Page.fox?SessionID=_72A1068MC
Page
= Page() function within Home.prg
www.LAFOX.org/Home.Page.fox?SessionID=_72A1068MC
.fox?SessionID=_72A1068MC
is the scriptmap extension that sends this "page"
to our Web Connect process class.
Web Connect URL Standard (2-parts)
Our URL syntax is not standard for Web Connect.
Web Connect standard URL syntax for scriptmap is:
www.LAFOX.org/MyFunction.ext
MyFunction = MyFunction()
function within (unnamed) prg
www.LAFOX.org/MyFunction.ext
.ext
is the scriptmap extension that sends this "page"
to our (unnamed) Web Connect process class.
If we follow that standard, we either have a
different scriptmap for each page,
each page would have its own extension home.hme for the home page,
MemberDirectory.mdr, etc.
OR we would have all the functions for all the pages in one very long and hard
to read prg.
Sending Additional
Parameters on URL Line
If we have additional parameters on the URL, we pass them after the
? as name=value pairs.
www.LAFOX.org/MemberResume.Page.fox?SessionID=_72A1068MC?lcAction=Sort&lcOrder=LastName
The first parameter is named
"lcAction" and it's value is "Sort"
www.LAFOX.org/MemberResume.Page.fox?SessionID=_72A1068MC&lcAction=Sort&lcOrder=LastName
Parameters are separated with a
&
www.LAFOX.org/MemberResume.Page.fox?SessionID=_72A1068MC&lcAction=Sort&lcOrder=LastName
The second parameter is named "lcOrder"
and it's value is "LastName"
www.LAFOX.org/MemberResume.Page.fox?SessionID=_72A1068MC&lcAction=Sort&lcOrder=LastName
A very common use for URL parameters is to pass a
record ID
www.LAFOX.org/MemberDirectory.Details.fox?SessionID=_72A1068MC&MemberID=0000000405
Reading Additional
Parameters in Web Connect Code
Use Request.QueryString to read URL Parameters
www.LAFOX.org/MemberDirectory.Details.fox?SessionID=_72A1068MC&MemberID=0000000405
In your FoxPro code:
lcMemberID = Request.QueryString("MemberID")