[thelist] ASP, FSO Replace
darren
darren at web-bitch.co.uk
Tue Feb 4 14:53:01 CST 2003
On Tuesday, February 4, 2003 at 20:41, Michele Foster wrote:
MF> Set objFSO = Server.CreateObject( "Scripting.FileSystemObject" )
MF> Set DisplayText =
MF> objFSO.OpenTextFile(Server.MapPath("/recruitment/combolists/list_citizenship
MF> .asp"))
don't forget to close the file system object and the like somewhere...
MF> strCombo = (DisplayText.ReadAll)
MF> Replace strCombo, "<option value=""1718"">","<option selected
MF> value=""1718"">"
you're not assigning the replace value to anything. try:
strCombo = replace(strCombo, "<option value=""1718"">", "<option selected value=""1718"">"
MF> response.write strCombo
hth,
darren.
More information about the thelist
mailing list