Showing posts with label content. Show all posts
Showing posts with label content. Show all posts

Wednesday, March 28, 2012

text content interface/component/control?

i wish to create a interface for my client to enter their news/announcement.
I've seen forums that has very nice interface that allow you click on
buttons such as "Bold", "Italic", "Underline", "URL", etc. How do i create
such interface? Or is there such a component? Within dreamweaver? How should
i go about developing such a interface? Thanks.Michael wrote:

> i wish to create a interface for my client to enter their news/announcement.
> I've seen forums that has very nice interface that allow you click on
> buttons such as "Bold", "Italic", "Underline", "URL", etc. How do i create
> such interface? Or is there such a component? Within dreamweaver? How should
> i go about developing such a interface? Thanks.

Take a look and see if http://www.freetextbox.com/ has what you need.

Daniel

Text editor

I want to create a simple text editor for my site so that administrators can update website content without having to know html. So for example in the text box they hit the enter key and it automatically inserts the <p></p> tags, and of course more advanced functions.

Does anyone know a good tutorial or something that tells me how i can achieve this?

thanks.www.richtextbox.com
Hello,

maybe a "HTML viewing and editing" component which is developed by the "WebMatrix"-Team is very helpful for you. Even if this component is developed as a WinForms-Application in C# you can see the complete source for developing a text editor where you can input and format a free text and then convert it to HTML-source.

You can download the component here:HTML viewing and editing component

HTH,

Monday, March 26, 2012

text formatting problem

hi guys,
I realized that whenever the text content of a database is loaded, its formatting (like paragraphing and alignment) is lost! How can I preserve these formattings?

cheersassign the output of the field into a variable (like: strFieldResults)

then, do a replace function on the contents:

strFieldResults=strFieldResults.Replace(vbcrlf, "<br>")

Each line feed separation is stored as a 'vbcrlf' -- - the browser doesn't understand that, so you need to replace these with the HTML LINE BREAK tag, so the browser will understand them.
ic...thx
hi augustwind,
I've tried the code you've given me but it doesn't seems to work. Instead of giving me a line break, it simply inserts a space in between the paragraphs. Do u have any working example of the code which i can reference to?
Use a Css Style sheet and set all your objects to the style you want.

like

.button{background-color: #000099; }

and then in your webform set button1's cssclass to button.

hope that helps
~
hi sausykat,
think you've misunderstood my question. My problem is that whenever the content from my database is loaded, the text's formatting is always lost. So I was asking how can I retain those formattings.

But however, you brought out an interesting point about using the css style sheet to customise the object's style--something which I didn't know how to use either.
So may I ask you where can I learn more about using css style sheet? Do you have a good tutorial for it or something?

Thanks for your help.
Most of what i've learned so far on style sheets are from the MSDN library and different forums i've jumped on.

Saturday, March 24, 2012

Text Manipulation

Can't anyone help me with this ?
I need it very soon to finish my project before sataerday.
Thank you in advance.
I want to develop a content management component that suits a blog or a
portal.
In it I develop an article authoring/browsing tool withwhich I do have a
problem.
When posting an Article, I want to replace each word like microsoft with
<a href=http://www.microsoft.com">Microsoft</a> where
http://www.microsoft.com is stored in the database. This is not a very big
problem I think especially using "foreach" in C#.
My real problem is tat I may provide the same word "Microsoft" as a part of
a URL liike
<a
href=http://www.microsoft.com/technet/community/scriptcenter/default.mspx">
Check out the new scripts in the TechNet Script Center </a>
or even an <asp:Hyperlink> ... In such cases, replacing the word "Microsoft"
is never wanted as it'll make a big problem to me.
How should I do that ?"Mohamed Ahmed Meligy" <xmastereg@.hotmail.com> wrote in message news:evNi9RHVEHA.4028@.TK2MSFTNGP09.phx.gbl...
> Can't anyone help me with this ?
> I need it very soon to finish my project before sataerday.
> Thank you in advance.
> I want to develop a content management component that suits a blog or a
> portal.
> In it I develop an article authoring/browsing tool withwhich I do have a
> problem.
> When posting an Article, I want to replace each word like microsoft with
> <a href=http://www.microsoft.com">Microsoft</a> where
> http://www.microsoft.com is stored in the database. This is not a very big
> problem I think especially using "foreach" in C#.
> My real problem is tat I may provide the same word "Microsoft" as a part of
> a URL liike
> <a
> href=http://www.microsoft.com/technet/community/scriptcenter/default.mspx">
> Check out the new scripts in the TechNet Script Center </a>
> or even an <asp:Hyperlink> ... In such cases, replacing the word "Microsoft"
> is never wanted as it'll make a big problem to me.
> How should I do that ?

Assuming that the text is html, so that a literal "<" is encoded (as <),
you can walk through the string, noting start (<) and finish (>) of tags.
Replace only in texts that are not tags.
The rest is left as an exercise for the reader :-)

Hans Kesting

Text Manipulation

Can't anyone help me with this ?
I need it very soon to finish my project before sataerday.
Thank you in advance.
I want to develop a content management component that suits a blog or a
portal.
In it I develop an article authoring/browsing tool withwhich I do have a
problem.
When posting an Article, I want to replace each word like microsoft with
<a href=http://www.microsoft.com">Microsoft</a> where
http://www.microsoft.com is stored in the database. This is not a very big
problem I think especially using "foreach" in C#.
My real problem is tat I may provide the same word "Microsoft" as a part of
a URL liike
<a
href=http://www.microsoft.com/technet/community/scriptcenter/default.mspx">
Check out the new scripts in the technet Script Center </a>
or even an <asp:Hyperlink> ... In such cases, replacing the word "Microsoft"
is never wanted as it'll make a big problem to me.
How should I do that ?"Mohamed Ahmed Meligy" <xmastereg@.hotmail.com> wrote in message news:evNi9RHVEHA.4028@.TK2MS
FTNGP09.phx.gbl...
> Can't anyone help me with this ?
> I need it very soon to finish my project before sataerday.
> Thank you in advance.
> I want to develop a content management component that suits a blog or a
> portal.
> In it I develop an article authoring/browsing tool withwhich I do have a
> problem.
> When posting an Article, I want to replace each word like microsoft with
> <a href=http://www.microsoft.com">Microsoft</a> where
> http://www.microsoft.com is stored in the database. This is not a very big
> problem I think especially using "foreach" in C#.
> My real problem is tat I may provide the same word "Microsoft" as a part o
f
> a URL liike
> <a
> href=http://www.microsoft.com/technet/community/scriptcenter/default.mspx"
> Check out the new scripts in the technet Script Center </a>
> or even an <asp:Hyperlink> ... In such cases, replacing the word "Microsof
t"
> is never wanted as it'll make a big problem to me.
> How should I do that ?
>
Assuming that the text is html, so that a literal "<" is encoded (as <),
you can walk through the string, noting start (< ) and finish (> ) of tags.
Replace only in texts that are not tags.
The rest is left as an exercise for the reader :-)
Hans Kesting

Thursday, March 22, 2012

textbod id changed automatically

Hi There,
I've a master page, and the content place i'v a page which has a text box
name tbCity. I would like to use javascript to find out that was blank or
not.
When i look at the sourcecode th text box id was chagned to
ctl00_Main_tbCity
why is it like this.
ThanksHello Ganesh

> I've a master page, and the content place i'v a page which has a text box
> name tbCity. I would like to use javascript to find out that was blank or
> not.
document.getElementById(<Control.ClientID> ).value == '';

> When i look at the sourcecode th text box id was chagned to
> ctl00_Main_tbCity
> why is it like this.
On the server side, ASP.NET has features like, nesting Controls, Namespaces,
etc..
that help to have consistente IDs. That means also, you can have more then
on of the same IDs on a page.
When ASP.NET rendered the code for viewing in a Html Browser, there are no
features like on the server side.
Here you can`t have more then one identic ID for a control.
So ASP.NET generates automatically IDs and Names where based on the control
hierarchy.
The <Control>.ClientID represents the ID Attribute on the clientside.
The <Control>.UniqueID represents the NAME Attribute on the clientside.
I have written a german article about identification of ASP.NET Controls.
Maybe you`r be able to understand the Google Translated Page:
-
http://translate.google.com/transla...aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
Hi Peter,
Thanks for your help.
"Peter Bucher [MVP]" <peter.bucher@.aspnetzone.de> wrote in message
news:OxXvYyf0HHA.1184@.TK2MSFTNGP04.phx.gbl...
> Hello Ganesh
>
> document.getElementById(<Control.ClientID> ).value == '';
>
> On the server side, ASP.NET has features like, nesting Controls,
> Namespaces, etc..
> that help to have consistente IDs. That means also, you can have more then
> on of the same IDs on a page.
> When ASP.NET rendered the code for viewing in a Html Browser, there are no
> features like on the server side.
> Here you can`t have more then one identic ID for a control.
> So ASP.NET generates automatically IDs and Names where based on the
> control hierarchy.
> The <Control>.ClientID represents the ID Attribute on the clientside.
> The <Control>.UniqueID represents the NAME Attribute on the clientside.
> I have written a german article about identification of ASP.NET Controls.
> Maybe you`r be able to understand the Google Translated Page:
> -
> http://translate.google.com/transla...aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
> http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
"Ganesh" <gsganesh@.yahoo.com> wrote in message
news:OO75qTf0HHA.1100@.TK2MSFTNGP06.phx.gbl...

> I've a master page, and the content place i'v a page which has a text box
> name tbCity. I would like to use javascript to find out that was blank or
> not.
> When i look at the sourcecode th text box id was chagned to
> ctl00_Main_tbCity
if (document.getElementById(<%=tbCity.ClientID%> ).value == '')
{
// do something
}

> why is it like this.
To guarantee uniqueness of ID.
Mark Rae
ASP.NET MVP
http://www.markrae.net