Is it possible to edit the actual hard coded HTML text within an aspx web page at runtime?

Hi,

Is it possible to edit the actual hard coded HTML text within an aspx web page at runtime?

Cheers

Paul
LVL 2
jazz__manAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ororioleCommented:
If you put your html in a literal control, then yes. In your code behind you can access myLiteralControl.Text and modify it. This works for Html and javascript, but it will not work if you try to put aspx controls inside of it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jazz__manAuthor Commented:
ororiole

Thanks very much for your assistance. It has taken a while for someone to answer this question. Must be a difficult one.

The reason I asked my question is that, I want to create a content management system without having to store lots of 'stuff' in the database, since, not only is this a lot of work but it also is not conducive to good search engine optimisation.

Would literal controls be a good way to think about designing a content management system? Or are there better/more flexible ways of doing this. I know there are good third party solutions for doing this but as a developer, I want to do this myself if possible.

Cheers

Paul
0
jazz__manAuthor Commented:
ororiole

Are you sure this works at runtime?

Can you give any code example?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

ororioleCommented:
Yes, I will write you up an example. As far as content management systems, using literals would be a primitive way of doing it. It would require the using to write all their own html. Usually they specify only certain text to be included in an area of the page, along with what should be links and where they link to, what the Title or subtitle should be, images, etc. A user doesn't need to know much about html in many systems.

Think of an area as a cell, and there are perhaps 6 cells on a page. The banners, the left menu, the main section, a footer, maybe three cells along the bottom instead of a footer. The user specifies "cell1" and this is the content I want. Then it is up to the CMS to take that input and translate it, often thru XSLT, into html.

As far as a database system, if you dont store your content into a db, you only have a content output system. You would push it to the web page and lose it. What if you want to go back and view what was up last week? If you want to take that and modify only one line, you are out of luck. I cant see doing it without a db as you would have no record of what you have done.
0
ororioleCommented:
Yes, I will write you up an example. As far as content management systems, using literals would be a primitive way of doing it. It would require the using to write all their own html. Usually they specify only certain text to be included in an area of the page, along with what should be links and where they link to, what the Title or subtitle should be, images, etc. A user doesn't need to know much about html in many systems.

Think of an area as a cell, and there are perhaps 6 cells on a page. The banners, the left menu, the main section, a footer, maybe three cells along the bottom instead of a footer. The user specifies "cell1" and this is the content I want. Then it is up to the CMS to take that input and translate it, often thru XSLT, into html.

As far as a database system, if you dont store your content into a db, you only have a content output system. You would push it to the web page and lose it. What if you want to go back and view what was up last week? If you want to take that and modify only one line, you are out of luck. I cant see doing it without a db as you would have no record of what you have done.
0
jazz__manAuthor Commented:
ororiole

Thanks, that was basically the answer I was looking for. My only issue with storing all the content in a db would be search engine optimisation purposes. I have read that to get a good search engine status you need hard coded HTML and this is what made me wonder if parts of the actual page could be updated at runtime. However I am sure there are ways round the search engine problems.

Cheers

Paul
0
jazz__manAuthor Commented:
There are still quite a few bugs on this website. Yours is not the first duplicate posting I have seen. I also got a duplicate question after trying to edit one I had just posted.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.