dontnetsanjay
asked on
physical html files on fly asp.net vs2005
can we genrate HTL files on the fly? like client enters data in a text box his physical file is created on the server like free web page. using from choice of master Pages.
VS2005, ASP.NET C#
VS2005, ASP.NET C#
ASKER
hello dropzone,
not this what i want to know
dynamically generating content for a web page thru databases text file or xml
using master pages or user controls are different concepts
create a physical html file suppose i have ntered file namein a text box say drop.html
then only we will check whether file exists or not and if ot then we create a file drop.html and adding content to that file is secondary issue which is not my query
not this what i want to know
dynamically generating content for a web page thru databases text file or xml
using master pages or user controls are different concepts
create a physical html file suppose i have ntered file namein a text box say drop.html
then only we will check whether file exists or not and if ot then we create a file drop.html and adding content to that file is secondary issue which is not my query
I understand. This is possible.
You can dynamically change the URL by using the HttpContext.RewritePath() method. You can do this from the Application_BeginRequest() event. At that point, you can check if the file exists, and if not, create it. You can also set a custom ASPX page for the 404 error (file not found), and in this page, generate dynamic content depending on the original request.
It depends on what you want to do ultimately. If you provide more details, we may be able to offer specific help.
-dZ.
You can dynamically change the URL by using the HttpContext.RewritePath() method. You can do this from the Application_BeginRequest()
It depends on what you want to do ultimately. If you provide more details, we may be able to offer specific help.
-dZ.
I forgot to offer a URL with help on using RewritePath():
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
http://www.15seconds.com/Issue/030522.htm
-dZ.
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
http://www.15seconds.com/Issue/030522.htm
-dZ.
I would suggest to use a component like Rewrite.NET. This allows the user to navigate the page "drop.html", but you don't need to actually create it. You can store the content in a database and use 1 page with a literal control on it which will hold all content.
You can find more information on: http://www.15seconds.com/Issue/030522.htm
You can find more information on: http://www.15seconds.com/Issue/030522.htm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hey dbaduck,
thanks for the answer thats what i wanted to know and its completely clear now thanks
Sanjay
thanks for the answer thats what i wanted to know and its completely clear now thanks
Sanjay
My preferred method is to use dynamic templates (I am still stuck using .NET 1.1, so I have no access to master pages). But I suppose that with master pages it is even easier.
-dZ.