omanuti Posted November 14, 2005 Share Posted November 14, 2005 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 More sharing options...
omanuti Posted November 14, 2005 Author Share Posted November 14, 2005 ... Link to comment Share on other sites More sharing options...
vijay Posted November 14, 2005 Share Posted November 14, 2005 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now