Stefan
Mon Aug 15 05:20:41 CDT 2005
PS
Also not a bad idea to clean up any unneeded Session variables at the end of the page by using:
<% Session.Contents.Remove("ArticleID") %>
--
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________
"Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message news:%23K0iYxBoFHA.3380@TK2MSFTNGP12.phx.gbl...
| The solution is at
|
http://home.att.net/~codelibrary/FrontPage/tweaks.htm#Link
| - as modified below
|
| If you modify your fpdbrgn1.inc to add the line
| if len(Request.QueryString(fp_sField)) = 0 then fp_sValue = Session(fp_sField)
| After around lines 124/125 and the current code as
| fp_sValue = Request.Form(fp_sField)
| if len(fp_sValue) = 0 then fp_sValue = Request.QueryString(fp_sField)
| if len(Request.QueryString(fp_sField)) = 0 then fp_sValue = Session(fp_sField) ' New Line Added
|
| NOTE: any time you add new DBRW you may need to re-edit fpdbrgn1.inc
|
|
| That means if FP finds an empty value in a Form field it next looks for something in a query string (w/ a length >0) in a query
| string being passed to it.
| And w/ the above change (Session now added)
| - if it finds neither, it will look for a Session value by that name
| You can then just set your page variable (above the HEAD section in the page) as say:
| <% Session("ArticleID") = "HT1005" %>
|
| And the use ArticleID session variable in your custom DBRW query (for the DB field also named ArticleID) as say:
| SELECT * FROM TableName WHERE ArticleID = '::ArticleID::'
|
| To get the ArticleID (page filename w/o an extension) from the page URL of the article
| - where say you have a file structure like :
| /articles/HT1005.asp or
http://somepath/some folder/HT1005.asp
|
| <%
| strURL = Request.ServerVariables("SCRIPT_NAME")
| ' get the page URL where the script is being run
| strFilePart = InStrRev(strURL,"/")+1
| ' find the location of the last / in the URL
| strPage = Mid(strURL,strFilePart,Len(strURL)-strFilePart+1)
| ' break out just the page filename from the URL
| strArticle = Replace(strPage,".asp","")
| ' clear the extension part of the page filename
| Session("ArticleID") = strArticle
| ' will give you HT1005 from a page like /articles/HT1005.asp
| %>
|
|
| ENJOY
| --
|
| _____________________________________________
| SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| "Warning - Using the F1 Key will not break anything!" (-;
| To find the best Newsgroup for FrontPage support see:
|
http://www.net-sites.com/sitebuilder/newsgroups.asp
| _____________________________________________
|
|
| "Max123" <Max123@discussions.microsoft.com> wrote in message news:0D991064-A8BF-4BEF-B6EB-C404930C9881@microsoft.com...
|| Hi Kathleen,
||
|| Thank you for your reply. I deeply appreciate your help and the time you
|| took to find a resolution. If I learn of a solution, I'll post it here.
||
|| Kind Regards, Max
|
|