Link to home
Start Free TrialLog in
Avatar of doramail05
doramail05Flag for Malaysia

asked on

Programmatically create asp.net page in runtime

Trying to programmatically create an asp.net page in the website root directory / folder,
and name it testpage.aspx, and then add some tags inside eg. <%@ Register Assembly="...:

and controls like placeholder with asp.net panel control inside.
Avatar of Psyberion
Psyberion
Flag of United Kingdom of Great Britain and Northern Ireland image

I haven't tested this theory, but I think it would be possible to simply create and write to .aspx and aspx.vb/cs files anywhere in your root folder or subfolders (depending on permissions) and have these compiled on the fly when those pages are requested. You could even programmatically amend those files and they will be recompiled the next time they are access.

You say you are trying to do this, what exactly is the problem you are experiencing or are you having trouble knowing where to start?
Avatar of doramail05

ASKER

probably on the create new page and naming it in the runtime part,

some controls to be added dynamically seems alright,
ASKER CERTIFIED SOLUTION
Avatar of Psyberion
Psyberion
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

The above user code should allow you to kick start with dynamic page creation!

In addition, check the below link -

http://www.msdotnetmentor.com/asp-net/how-to-create-aspx-page-dynamically-a-step-ahead-series.html

Hope it helps u...