Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2008-11-17
7
Medium Priority
?
203 Views
Last Modified: 2012-05-05
Hi,

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

Cheers

Paul
0
Comment
Question by:jazz__man
  • 4
  • 3
7 Comments
 
LVL 16

Accepted Solution

by:
ororiole earned 2000 total points
ID: 22979066
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
 
LVL 2

Author Comment

by:jazz__man
ID: 22983237
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
 
LVL 2

Author Comment

by:jazz__man
ID: 22983332
ororiole

Are you sure this works at runtime?

Can you give any code example?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:ororiole
ID: 22986759
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
 
LVL 16

Expert Comment

by:ororiole
ID: 22986846
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
 
LVL 2

Author Comment

by:jazz__man
ID: 22986864
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
 
LVL 2

Author Comment

by:jazz__man
ID: 22986897
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question