473,781 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to create html template to define editable regions

I am creating a totally adminable news system in asp.net (C#, SQL
server). what i want to accomplish is allow multiple news templates
to be read by an admin area.

heres how it works (hopefully): an artist creates a news template
(html file), drops it into a specific directory, now a client can
choose that template and edit a certain number of fields. the artist
has to be able to specify these fields in the template somehow,
example:

....html tags...
news-NewsTitle-text-news
...html tages...
news-NewsDate-text-news
...html...
news-NewsImage1-image-news
...html tags....

now my admin area needs to read this template file and pull out of it
each of these fields to save to a db which describes the news article.

fieldname="News Title", fieldtype="text "
fieldname="News Date", fieldtype="text "
fieldname="News Image 1" fieldtype="imag e"

then based on that info i'll create an admin area where they can edit
the actual info saved for each of those. what i need some advise on
is how should i instruct the artists to label each of the fields in
the template, and then how should i pull that info off the template.

I'm pretty new to C# and asp.net, but have experience with classic
asp(vbscript). what i think of is useing filesystemobjec t, write a
function that will read the html templates line by line, looking for
"news-" and somehow extracting everything there before the "-news".
would this be a good situation to learn reg exp's to use here?

Thank You much for any time you are able to spend to give me a bit of
advise!
Jul 19 '05 #1
1 3594
sc******@cableo ne.net (dSchwartz) wrote in message news:<4a******* *************** ****@posting.go ogle.com>...
I'm pretty new to C# and asp.net, but have experience with classic
asp(vbscript). what i think of is useing filesystemobjec t, write a
function that will read the html templates line by line, looking for
"news-" and somehow extracting everything there before the "-news".
would this be a good situation to learn reg exp's to use here?

Thank You much for any time you are able to spend to give me a bit of
advise!

My first read would be that you would be much better off using XML, so
you can benefit from the .NET support for XML.

Rather than news being between news- and -news you use the XML
convention of <news>....</news>.

This would also make your system more scalable. You have a template
which consumes the XML to create news stories. By using XML rather
than your own codes you can easily convert the system to a webservice,
where you isolate the content contribution in on one site and the
template and publishing on another. In this way you can have the same
content read in to (consumed) by many sites on both .NET and JAVA
Enterprise servers, and you can consume news stories from multiple
services.

Do some research on SOAP and Web Services. It may give you a vastly
more powerful system with little more scaling, and open you site to
inclusion of portlets from the outside world as well as multiple
servers sites.
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2371
by: billy | last post by:
I've got a set of subclasses that each derive from a common base class. What I'd like to do is create a global array of the class types (or, class names) that a manager class can walk through in its constructor and instantiate one of each of the class types in this global array. So, it's almost like the global array has to hold data types as opposed to data. Basically, I currently have to add the items manually 1 at a time.
3
5394
by: Richard Fritzler | last post by:
I was given the task of designing a complete web based document prep system. In simplest terms (using a msword explanation) create a database of merge fields, and a library of templates. Allow the webuser to select the template, merge his DB record, and produce a formatted document that can be printed or downloaded. We need to do this without specialized software on the client, since it will be universally available to webusers. We...
1
235
by: dSchwartz | last post by:
I am creating a totally adminable news system in asp.net (C#, SQL server). what i want to accomplish is allow multiple news templates to be read by an admin area. heres how it works (hopefully): an artist creates a news template (html file), drops it into a specific directory, now a client can choose that template and edit a certain number of fields. the artist has to be able to specify these fields in the template somehow, example:
3
3758
by: Hamilton Woods | last post by:
Diehards, I developed a template matrix class back around 1992 using Borland C++ 4.5 (ancestor of C++ Builder) and haven't touched it until a few days ago. I pulled it from the freezer and thawed it out. I built a console app using Microsoft Visual C++ 6 (VC++) and it worked great. Only one line in the header file had to be commented out. I built a console app using Borland C++ Builder 5. The linker complained of references to...
2
2134
by: justplain.kzn | last post by:
Hi, I have a table with dynamic html that contains drop down select lists and readonly text boxes. Dynamic calculations are done on change of a value in one of the drop down select lists. Using Safari,my first iteration the script works fine ( indicating that there are 33 form variables ). When trying another dropdown select value, the
5
1825
by: Sunny | last post by:
Hi, I want to create a library out of a C++ sources. The implementation should be in object files and there will be a header file which the client will #include. I want to use templates to implement the code. This is the API in the header file: void GenericQSort (T A, int len); and clients can call it like :
15
5276
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
17
1915
by: henry | last post by:
Folks Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit of php code in the middle: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
1
1299
by: wizardry | last post by:
I'm having problems with this templete i created and defined editable regions 3 to be exact and saved as templete. then i created a new page from the templete i just created so the links were their to update the editable regions. but when i publish the new templete it doesnt update the child file. thanks in advance for your help!
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.