Jump to content

automatic dynamic pages


omanuti

Recommended Posts

I would like to know how can I creat a script in the web-application I am building for a client' that will creat an asp page according to a templet page i have created before. For ex: the client will enter the name "dog1" and a picture and the app will create an asp called dog1.asp according to the file atemplate.asp I have made.

Link to comment
Share on other sites

Hi,OmanutiTry with Following CodeSyntactically if wrong then correct it but logic is this<%dim cnamefname=Request.QueryString("cname")If cname<>"" ThenSet fs=Server.CreateObject("Scripting.FileSystemObject") If (fs.FileExists("c:\& cname &.asp"))=true Then Response.Write("File c:\& cname &.asp exists.") Else set fname=fs.CreateTextFile("c:\& cname &.asp",true) Response.Write("File created as c:\& cname &.asp") End Ifset fs=nothingEnd if %><form method="get">Client Name: <input type="text" name="Cname" size="20"><INPUT TYPE="submit" NAME="Submit" VALUE="Submit" ></form>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...