Last post Jan 27, 2011 08:53 AM by johnhennesey
Jan 25, 2011 11:27 AM|JohnHennesey|LINK
I do not know the best way to ask this, so please do your best to read my mind...
I would like to provide my client with a aspx pages, with code behind provided, etc. But in some cases they will want to write their own markup - I'm thinking of having 2 directories [siblings of each other], one for the pages I provide, and the other for
their custom markup. At page serve time, check to see if the client wrote their own markup and if so use it. Otherwise use the default provided.
In a nutshell I would like for my clients to be able to modify the pages I provide, but if they blow it up have a very easy way to back it out. Or to put it in a more positive light, allow them to override my pages easily. I am open to any/all suggestions,
as I am more of a database guy and do not know all of the bells and whistles of .net/aspx's.
Thank you in advance,
Jan 25, 2011 12:09 PM|p3tar|LINK
I belive you need to create dynamic
pages system if you want to allow your users to build their own markup. You can have only one .aspx page serve up different data, based on the call to the database or XML files (etc.) where you have stored original or custom-user page markups....
Jan 25, 2011 02:23 PM|atconway|LINK
But in some cases they will want to write their own markup - I'm thinking of having 2 directories [siblings of each other], one for the pages I provide, and the other for their custom markup. At page serve time, check to see if the client wrote their own markup
and if so use it. Otherwise use the default provided.
This might be difficult unless it is only a small section of the page (like inside a DIV or something) because when building ASP.NET webpages you do not have full control over the HTML as it stands to override it in its entirity in the 1st place (like MVC
may provide). I think it might be possible is small parts or portions of a page, but what if the clients HTML is not well formed, or has a malicious script embedded within it? If you are trying to render an entire page or even parts from source you
do not control, I would heavily advise against it. It could have adverse security affects that you do not want.
However, the type of functionality you require sounds more fitting for a Content Management System (CMS) like DotNetNuke, Sharepoint, etc. It allows the clients to modify or customize sites to their liking, but yet still conform to a defined structure. I
know DNN has a free trial version you can download and maybe it would be worth trying. If you do decide on using some externally created page source, you are going to need to analyze it closely to make sure it doesn;t cause your site to crash.
And lastly remember too you have things like Themes, CSS, etc. that can vary based on the client's identity so maybe a combination of these suggestions might help solve the problem.
Jan 25, 2011 04:00 PM|JohnHennesey|LINK
Jan 27, 2011 12:38 AM|RedDevil|LINK
I worked on a project where we had only single aspx page in system along with lot of user controls . It was more of a CMS where the admin can create a page on fly but specifying the name of user controls and system should be able to render those controls.
My sugesstion is to create xml structure with control names and create a module like .net rendering engine which will read controls in xml at run time and then load and render them in a single aspx page available in the system .
Jan 27, 2011 08:53 AM|JohnHennesey|LINK
Interesting idea... Most folks thus far have taken the approach of either db driven, xml driven, etc. Looks like this the way to go. thanks!