Simple question on web content ???

G

Guest

Dear all,

How do you usually do to handle a huge string (like article) to be display
on the web page content.

I mean by that :

How this huge string is store in sql database ? directly as whole string
content field or file reference link or something else....

How it is retrive ?

thanks for your information
regards
serge
 
G

Guest

string is fine, pulled from SQL. I've done this many times, with large text
blocks.
You can bypass the string and just set the TextBox.Text = dr("Field") and
save yourself the step but either way is fine. When things are plain text
they are handled quickly and well.
 
G

Guest

Thanks for your answer...

I have read somewhere that huge string shuld be handle with the
Stringbuilder object ???
 
S

S. Justin Gengo

Serge,

That's when you're concatenating. If you do this:

Dim MyString As String = "This " & "is " & "a " & "test."

Every time an ampersand is hit (or a + in c#) a new string object is created
to put the whole string together. In those instances a string builder saves
a lot of overhead. If you're working with a large string pulled out of a
database but there is no concatenation necessary then there is no need to
put the string into a string builder first. That would actually create more
overhead.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
G

Guest

Thnaks for your clarification

S. Justin Gengo said:
Serge,

That's when you're concatenating. If you do this:

Dim MyString As String = "This " & "is " & "a " & "test."

Every time an ampersand is hit (or a + in c#) a new string object is created
to put the whole string together. In those instances a string builder saves
a lot of overhead. If you're working with a large string pulled out of a
database but there is no concatenation necessary then there is no need to
put the string into a string builder first. That would actually create more
overhead.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
G

Guest

Still a think that I would like to try to understand.

For example when you see a full text page with formated content with bullet
and pargraph etc...
Does all those text page comes from a single database string field ?

Or could it be a normal HTML page with direct typing in ?
 
S

S. Justin Gengo

Serge,

It depends upon how the developer set it up. I recently completed a
newsletter application for the company I work for full time that allows our
editors to create their newsletters (both plain text and html versions)
without knowing any html code at all. I chose Free Text Box
http://www.freetextbox.com/ for allowing editor's to input their text. Then
I store the entire html string directly to the database.

Another option is to store all text as XML and create XSLT files for
deliverying the content in a consistent manner.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top