Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Thursday, March 29, 2012

Newbie: How to start

Hi

I have a html page with a form. How can I start turning this into an asp.net
page to including validation and submit processing?

Thanks

Regards

YahyaHey,
Well first things first. Create a web project if you are using Visual
Studio. If not .. you will need to work a bit more and create a virtual
directory and an aspx page. Similar to a normal html page but with lot of
extra tags... Get yourself a good asp.net book.
Now copy the html body and paste it in the aspx file. When you double a html
object like button or image it will be converted to equivalent web control
Have fun learning.. its fun..

Hermit Dave

"John" <john@.nospam.infovis.co.uk> wrote in message
news:%23neTBVQvDHA.2464@.TK2MSFTNGP12.phx.gbl...
> Hi
> I have a html page with a form. How can I start turning this into an
asp.net
> page to including validation and submit processing?
> Thanks
> Regards
>
> Yahya

newbie: HTML controls vs Web controls

Hello,
I am learning .NET 2.0. And I have a question: when to use web-controls and
when to use HTML controls?
/RAM/Hi,
R.A.M. wrote:
> Hello,
> I am learning .NET 2.0. And I have a question: when to use web-controls an
d
> when to use HTML controls?
> /RAM/
The System.Web.UI.HtmlControls namespace is for HTML controls, in the
sense that they are declared on the page using standard HTML tags, for
example "input", "select", "textarea", etc...
The System.Web.UI.WebControls namespace is for ASP.NET controls, which
are declared on the page with an "asp:" prefix, for example "asp:Checkbox".
The different is that in the first case, they're client-side controls.
You use them on the server in order to set attributes, scripts, etc...
which are executed on the client. In the second case, however, (and
while you can also influence the way they will be rendered on the
client), the events you wire them to are executed on the server
(involving a postback).
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
It depends on what you are more comfortable with. If you come from Windows
application background, you will find that web controls are more friendly
and they are a less dramatic change from your previous experience.. If you
come from html background you will like html controls. As you master your
asp.net skills, you will likely lean more towards html controls as they give
you better control over client-side functionality.
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"R.A.M." <r_ahimsa_m@.poczta.onet.pl> wrote in message
news:ejgq05$8h1$1@.news.onet.pl...
> Hello,
> I am learning .NET 2.0. And I have a question: when to use web-controls
> and when to use HTML controls?
> /RAM/
>

newbie: HTML controls vs Web controls

Hello,
I am learning .NET 2.0. And I have a question: when to use web-controls and
when to use HTML controls?
/RAM/Hi,

R.A.M. wrote:

Quote:

Originally Posted by

Hello,
I am learning .NET 2.0. And I have a question: when to use web-controls and
when to use HTML controls?
/RAM/


The System.Web.UI.HtmlControls namespace is for HTML controls, in the
sense that they are declared on the page using standard HTML tags, for
example "input", "select", "textarea", etc...

The System.Web.UI.WebControls namespace is for ASP.NET controls, which
are declared on the page with an "asp:" prefix, for example "asp:Checkbox".

The different is that in the first case, they're client-side controls.
You use them on the server in order to set attributes, scripts, etc...
which are executed on the client. In the second case, however, (and
while you can also influence the way they will be rendered on the
client), the events you wire them to are executed on the server
(involving a postback).

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
It depends on what you are more comfortable with. If you come from Windows
application background, you will find that web controls are more friendly
and they are a less dramatic change from your previous experience.. If you
come from html background you will like html controls. As you master your
asp.net skills, you will likely lean more towards html controls as they give
you better control over client-side functionality.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"R.A.M." <r_ahimsa_m@.poczta.onet.plwrote in message
news:ejgq05$8h1$1@.news.onet.pl...

Quote:

Originally Posted by

Hello,
I am learning .NET 2.0. And I have a question: when to use web-controls
and when to use HTML controls?
/RAM/
>

Monday, March 26, 2012

newbie: need help with this css/html code

hey
asp.net 2.0
Please, I need some help with the layout of my webpage. this link shows my
problem: http://home.online.no/~au-holme/pub.../divtrouble.PNG
Instead of fieldname and value are displayed like this:
<FIELDNAME>
<FIELDVALUE>
I want fieldname & fieldvalue to be displayed on the same line:
<FIELDNAME> <FIELDVALUE>
This is my html:
<ul class="settings">
<li>Site preference
<ul class="subsettings">
<li><div class="setting">
<div class="fieldname">Newsletter:</div>
<div class="fieldvalue">
<asp:DropDownList ID="ddlSubscriptions"
runat="server">
<asp:ListItem Text="No subscription"
Value="None" Selected="true"></asp:ListItem>
<asp:ListItem Text="Subscribe to plain-text
vesion" Value="PlainText"></asp:ListItem>
<asp:ListItem Text="Subscribe to HTML version"
Value="Html"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</li>
<li><div class="fieldname">Language:</div>
<asp:DropDownList ID="ddlLanguages" runat="server">
<asp:ListItem Text="English" Value="en-US"
Selected="True"></asp:ListItem>
<asp:ListItem Text="Norwegian"
Value="no-NO"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</li>
<li>Personal details
</li>
</ul>
This is my css:
.settings, .subsettings
{
list-style:none;
}
.settings li
{
font-family:Arial;
font-size:xx-large;
}
.subsettings li
{
font-family:Arial;
font-size:medium;
}
.subsettings li .fieldname
{
width:180px;
border:solid 2px yellow;
}
.subsettings li .fieldvalue
{
width:220px;
border:solid 2px cyan;
}
.setting
{
width:500px;
border:solid 2px red;
}<div>'s are a block element, meaning they go on their own line. use a
<span> which is an inline element instead.
-- bruce (sqlwork.com)
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:OOemtbo3GHA.3812@.TK2MSFTNGP06.phx.gbl...
> hey
> asp.net 2.0
> Please, I need some help with the layout of my webpage. this link shows my
> problem: http://home.online.no/~au-holme/pub.../divtrouble.PNG
> Instead of fieldname and value are displayed like this:
> <FIELDNAME>
> <FIELDVALUE>
> I want fieldname & fieldvalue to be displayed on the same line:
> <FIELDNAME> <FIELDVALUE>
> This is my html:
> <ul class="settings">
> <li>Site preference
> <ul class="subsettings">
> <li><div class="setting">
> <div class="fieldname">Newsletter:</div>
> <div class="fieldvalue">
> <asp:DropDownList ID="ddlSubscriptions"
> runat="server">
> <asp:ListItem Text="No subscription"
> Value="None" Selected="true"></asp:ListItem>
> <asp:ListItem Text="Subscribe to plain-text
> vesion" Value="PlainText"></asp:ListItem>
> <asp:ListItem Text="Subscribe to HTML version"
> Value="Html"></asp:ListItem>
> </asp:DropDownList>
> </div>
> </div>
> </li>
> <li><div class="fieldname">Language:</div>
> <asp:DropDownList ID="ddlLanguages" runat="server">
> <asp:ListItem Text="English" Value="en-US"
> Selected="True"></asp:ListItem>
> <asp:ListItem Text="Norwegian"
> Value="no-NO"></asp:ListItem>
> </asp:DropDownList>
> </li>
> </ul>
> </li>
> <li>Personal details
> </li>
> </ul>
> This is my css:
> .settings, .subsettings
> {
> list-style:none;
> }
> .settings li
> {
> font-family:Arial;
> font-size:xx-large;
> }
> .subsettings li
> {
> font-family:Arial;
> font-size:medium;
> }
> .subsettings li .fieldname
> {
> width:180px;
> border:solid 2px yellow;
> }
> .subsettings li .fieldvalue
> {
> width:220px;
> border:solid 2px cyan;
> }
> .setting
> {
> width:500px;
> border:solid 2px red;
> }
>

newbie: need help with this css/html code

hey

asp.net 2.0

Please, I need some help with the layout of my webpage. this link shows my
problem: http://home.online.no/~au-holme/pub.../divtrouble.PNG
Instead of fieldname and value are displayed like this:
<FIELDNAME>
<FIELDVALUE>

I want fieldname & fieldvalue to be displayed on the same line:
<FIELDNAME<FIELDVALUE>

This is my html:
<ul class="settings">
<li>Site preference
<ul class="subsettings">
<li><div class="setting">
<div class="fieldname">Newsletter:</div>
<div class="fieldvalue">
<asp:DropDownList ID="ddlSubscriptions"
runat="server">
<asp:ListItem Text="No subscription"
Value="None" Selected="true"></asp:ListItem>
<asp:ListItem Text="Subscribe to plain-text
vesion" Value="PlainText"></asp:ListItem>
<asp:ListItem Text="Subscribe to HTML version"
Value="Html"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</li>
<li><div class="fieldname">Language:</div>
<asp:DropDownList ID="ddlLanguages" runat="server">
<asp:ListItem Text="English" Value="en-US"
Selected="True"></asp:ListItem>
<asp:ListItem Text="Norwegian"
Value="no-NO"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</li>
<li>Personal details
</li>
</ul>

This is my css:
..settings, .subsettings
{
list-style:none;
}

..settings li
{
font-family:Arial;
font-size:xx-large;
}

..subsettings li
{
font-family:Arial;
font-size:medium;
}

..subsettings li .fieldname
{
width:180px;
border:solid 2px yellow;
}

..subsettings li .fieldvalue
{
width:220px;
border:solid 2px cyan;
}

..setting
{
width:500px;
border:solid 2px red;
}<div>'s are a block element, meaning they go on their own line. use a
<spanwhich is an inline element instead.

-- bruce (sqlwork.com)

"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:OOemtbo3GHA.3812@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

hey
>
asp.net 2.0
>
Please, I need some help with the layout of my webpage. this link shows my
problem: http://home.online.no/~au-holme/pub.../divtrouble.PNG
>
Instead of fieldname and value are displayed like this:
<FIELDNAME>
<FIELDVALUE>
>
I want fieldname & fieldvalue to be displayed on the same line:
<FIELDNAME<FIELDVALUE>
>
This is my html:
<ul class="settings">
<li>Site preference
<ul class="subsettings">
<li><div class="setting">
<div class="fieldname">Newsletter:</div>
<div class="fieldvalue">
<asp:DropDownList ID="ddlSubscriptions"
runat="server">
<asp:ListItem Text="No subscription"
Value="None" Selected="true"></asp:ListItem>
<asp:ListItem Text="Subscribe to plain-text
vesion" Value="PlainText"></asp:ListItem>
<asp:ListItem Text="Subscribe to HTML version"
Value="Html"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</li>
<li><div class="fieldname">Language:</div>
<asp:DropDownList ID="ddlLanguages" runat="server">
<asp:ListItem Text="English" Value="en-US"
Selected="True"></asp:ListItem>
<asp:ListItem Text="Norwegian"
Value="no-NO"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</li>
<li>Personal details
</li>
</ul>
>
This is my css:
.settings, .subsettings
{
list-style:none;
}
>
.settings li
{
font-family:Arial;
font-size:xx-large;
}
>
.subsettings li
{
font-family:Arial;
font-size:medium;
}
>
.subsettings li .fieldname
{
width:180px;
border:solid 2px yellow;
}
>
.subsettings li .fieldvalue
{
width:220px;
border:solid 2px cyan;
}
>
.setting
{
width:500px;
border:solid 2px red;
}
>

Saturday, March 24, 2012

Newbie: Removing underline from Hyperlink

Hi,
I've added hyperlink objects to a web form & I would like to display them
without the underline. How can I do this?
The element in HTML appears to be <asp:Hyperlink

thus in a stylesheet:

asp:HyperLink
{
text-decoration:none
}

I tried to set this up in a stylesheet but no go.

How can i state a hyperlink object in a style sheet, or some other way to do
this?

Many thanks for any ideas on this

AntOn Sep 29, 10:13 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,
I've added hyperlink objects to a web form & I would like to display them
without the underline. How can I do this?
The element in HTML appears to be <asp:Hyperlink
>
thus in a stylesheet:
>
asp:HyperLink
{
text-decoration:none
>
}
>
I tried to set this up in a stylesheet but no go.
>
How can i state a hyperlink object in a style sheet, or some other way to do
this?
>
Many thanks for any ideas on this
>
Ant


for all links
a
{
text-decoration:none
}

per control

a.c1
{
text-decoration:none
}
...
<asp:HyperLink ... class="c1"...

Newbie: Tables in ASP

Hi,

I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.

Many thanks for any help with this in advance

Anthi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar

On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,


Quote:

Originally Posted by

>
I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.
>
Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.
>
Many thanks for any help with this in advance
>
Ant


Hi Nick,

That sounds promising. Could you spoon feed me to find where the Controls
tool bar is. I just can't seem to find it.

Many thanks for your reply!

Anthony

"Nick Chan" wrote:

Quote:

Originally Posted by

hi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar
>
On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,


>

Quote:

Originally Posted by


I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.

Many thanks for any help with this in advance

Ant


>
>
>


hi, when u switch to designer mode, u should see the Toolbox on the
left. if not go to View Toolbox
under HTML section, u should see a Table control

On Sep 17, 10:52 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi Nick,
>
That sounds promising. Could you spoon feed me to find where the Controls
tool bar is. I just can't seem to find it.
>
Many thanks for your reply!
>
Anthony
>
>
>
"Nick Chan" wrote:

Quote:

Originally Posted by

hi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar


>

Quote:

Originally Posted by

On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,


>

Quote:

Originally Posted by

Quote:

Originally Posted by

I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Many thanks for any help with this in advance


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Ant- Hide quoted text -


>
- Show quoted text -


Look at that! Wonderful!

Thank you very much Nick, you've been a great help to this dazed & confused
newbie!

Much appreciated!

Ant

"Nick Chan" wrote:

Quote:

Originally Posted by

hi, when u switch to designer mode, u should see the Toolbox on the
left. if not go to View Toolbox
under HTML section, u should see a Table control
>
On Sep 17, 10:52 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi Nick,

That sounds promising. Could you spoon feed me to find where the Controls
tool bar is. I just can't seem to find it.

Many thanks for your reply!

Anthony

"Nick Chan" wrote:

Quote:

Originally Posted by

hi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar


Quote:

Originally Posted by

On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:
Hi,


Quote:

Originally Posted by

I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.


Quote:

Originally Posted by

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.


Quote:

Originally Posted by

Many thanks for any help with this in advance


Quote:

Originally Posted by

Ant- Hide quoted text -


- Show quoted text -


>
>
>

Thursday, March 22, 2012

Newby Question Linking of data between HTML and ASP!

Xref: TK2MSFTNGP08.phx.gbl microsoft.public.dotnet.framework.aspnet:297891
Hi:
I am an utter virgin at ASP, but have experience in HTML!
I have a very basic question.
I have an ASP sheet, where I wish to permit the user to enter a code, and th
en return the
results of a query against a table, using that code. My problem is that I do
n't quite know
how to:
A Present the end user input to the query
B. Present the results to the HTML: code.
In the query I have tried common sql techniques such as "Like{Input the code
]", but that
does not work.
I know there must be an easy way, but it too simple to show up in the materi
als I am
reading.
Can someone point me in the direction of an answer.
Thanks
John Baker> Can someone point me in the direction of an answer.
You can find an answer on the ASP ewsgroups:
microsoft.public.inetserver.asp.db
microsoft.public.inetserver.asp.general
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"John Baker" <Baker.JH@.Verizon.net> wrote in message
news:cccf01dcm7rb7khonngaqa95qv2o8n15sh@.
4ax.com...
> Hi:
> I am an utter virgin at ASP, but have experience in HTML!
> I have a very basic question.
> I have an ASP sheet, where I wish to permit the user to enter a code, and
> then return the
> results of a query against a table, using that code. My problem is that I
> don't quite know
> how to:
> A Present the end user input to the query
> B. Present the results to the HTML: code.
> In the query I have tried common sql techniques such as "Like{Input the
> code]", but that
> does not work.
> I know there must be an easy way, but it too simple to show up in the
> materials I am
> reading.
> Can someone point me in the direction of an answer.
> Thanks
> John Baker
Kevin:
Unfortunately Verizon does not offer them.
Any other alternatives?
John
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote:

>microsoft.public.inetserver.asp.general
This is a newsgroup. If you have Outlook Express, you have a news reader.
Using Outlook Experss's newsreader, go to the msnews.microsoft.com news
server and you'll find all of the Microsoft newsgroups.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"John Baker" <Baker.JH@.Verizon.net> wrote in message
news:r2rf015ek9aq5rc9kj82ra9vgll0t6fe4u@.
4ax.com...
> Kevin:
> Unfortunately Verizon does not offer them.
> Any other alternatives?
> John
> "Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote:
>
>

Newby Question Linking of data between HTML and ASP!

Hi:

I am an utter virgin at ASP, but have experience in HTML!

I have a very basic question.

I have an ASP sheet, where I wish to permit the user to enter a code, and then return the
results of a query against a table, using that code. My problem is that I don't quite know
how to:

A Present the end user input to the query
B. Present the results to the HTML: code.

In the query I have tried common sql techniques such as "Like{Input the code]", but that
does not work.

I know there must be an easy way, but it too simple to show up in the materials I am
reading.

Can someone point me in the direction of an answer.

Thanks

John Baker> Can someone point me in the direction of an answer.

You can find an answer on the ASP ewsgroups:

microsoft.public.inetserver.asp.db
microsoft.public.inetserver.asp.general

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"John Baker" <Baker.JH@.Verizon.net> wrote in message
news:cccf01dcm7rb7khonngaqa95qv2o8n15sh@.4ax.com...
> Hi:
> I am an utter virgin at ASP, but have experience in HTML!
> I have a very basic question.
> I have an ASP sheet, where I wish to permit the user to enter a code, and
> then return the
> results of a query against a table, using that code. My problem is that I
> don't quite know
> how to:
> A Present the end user input to the query
> B. Present the results to the HTML: code.
> In the query I have tried common sql techniques such as "Like{Input the
> code]", but that
> does not work.
> I know there must be an easy way, but it too simple to show up in the
> materials I am
> reading.
> Can someone point me in the direction of an answer.
> Thanks
> John Baker
Kevin:

Unfortunately Verizon does not offer them.

Any other alternatives?

John
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote:

>microsoft.public.inetserver.asp.general
This is a newsgroup. If you have Outlook Express, you have a news reader.
Using Outlook Experss's newsreader, go to the msnews.microsoft.com news
server and you'll find all of the Microsoft newsgroups.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"John Baker" <Baker.JH@.Verizon.net> wrote in message
news:r2rf015ek9aq5rc9kj82ra9vgll0t6fe4u@.4ax.com...
> Kevin:
> Unfortunately Verizon does not offer them.
> Any other alternatives?
> John
> "Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote:
>>microsoft.public.inetserver.asp.general

Friday, March 16, 2012

Newline with HTMLEncode in Div and Label

Hi

I have a table column that has multiple lines (\r\n) and html tags in it. I
want to display it in a div and label that html tags can be seen and
newlines should work.
If i use div.innerHTML newlines are lost and html tags doesn't show.
If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks works
but html tags doesn't show.
If i use div.innerText again newlines and html tags are lost.

What can i do?

ThanksVersus,
The bottom line is that "\r\n" means nothing in HTML - you have to change it
to "<br/>" -- which means you need to pre-process your string with
..Replace("\r\n", "<br/>");

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"versus" wrote:

Quote:

Originally Posted by

Hi
>
I have a table column that has multiple lines (\r\n) and html tags in it. I
want to display it in a div and label that html tags can be seen and
newlines should work.
If i use div.innerHTML newlines are lost and html tags doesn't show.
If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks works
but html tags doesn't show.
If i use div.innerText again newlines and html tags are lost.
>
What can i do?
>
Thanks
>
>
>


Thanks for answering. Replace(Environment.NewLine,"<br>") already works for
that problem. But i cannot see html tags as regular text. I want them to be
displayed not parsed with htmlparser.

Let me explain again. I have an sql db table with columns that has both
environment.newline(\r\n) and html tags. I want newlines to break lines and
html tags to be displayed at the same time.

"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.yohohhoandabottleofrum.comwrote
in message news:4CA1F3DF-BB2B-479B-8025-69154C4984C5@.microsoft.com...

Quote:

Originally Posted by

Versus,
The bottom line is that "\r\n" means nothing in HTML - you have to change
it
to "<br/>" -- which means you need to pre-process your string with
.Replace("\r\n", "<br/>");
>
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
>
>
>
"versus" wrote:
>

Quote:

Originally Posted by

>Hi
>>
>I have a table column that has multiple lines (\r\n) and html tags in it.
>I
>want to display it in a div and label that html tags can be seen and
>newlines should work.
>If i use div.innerHTML newlines are lost and html tags doesn't show.
>If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks
>works
>but html tags doesn't show.
>If i use div.innerText again newlines and html tags are lost.
>>
>What can i do?
>>
>Thanks
>>
>>
>>


"versus" <tencere@.dibin.karawrote in message
news:ee99xTJGIHA.4808@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

Thanks for answering. Replace(Environment.NewLine,"<br>") already works
for that problem. But i cannot see html tags as regular text. I want them
to be displayed not parsed with htmlparser.
>
Let me explain again. I have an sql db table with columns that has both
environment.newline(\r\n) and html tags. I want newlines to break lines
and html tags to be displayed at the same time.
>
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.yohohhoandabottleofrum.com>
wrote in message
news:4CA1F3DF-BB2B-479B-8025-69154C4984C5@.microsoft.com...

Quote:

Originally Posted by

>Versus,
>The bottom line is that "\r\n" means nothing in HTML - you have to change
>it
>to "<br/>" -- which means you need to pre-process your string with
>.Replace("\r\n", "<br/>");
>>
>-- Peter
>Recursion: see Recursion
>site: http://www.eggheadcafe.com
>unBlog: http://petesbloggerama.blogspot.com
>BlogMetaFinder: http://www.blogmetafinder.com
>>
>>
>>
>"versus" wrote:
>>

Quote:

Originally Posted by

>>Hi
>>>
>>I have a table column that has multiple lines (\r\n) and html tags in
>>it. I
>>want to display it in a div and label that html tags can be seen and
>>newlines should work.
>>If i use div.innerHTML newlines are lost and html tags doesn't show.
>>If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks
>>works
>>but html tags doesn't show.
>>If i use div.innerText again newlines and html tags are lost.
>>>
>>What can i do?
>>>
>>Thanks
>>>
>>>
>>>


>
>


I think if you use the <pretag to wrap your code it will honor the CRLF
and show the tags as if they are text within the <pre></pretags.

Hope this helps
LS
I think if you use the <pretag to wrap your code it will honor the CRLF

Quote:

Originally Posted by

and show the tags as if they are text within the <pre></pretags.
>
Hope this helps
LS


Thanks but his solution removes css classes and when i use checkbox with
label, label click doesn't work.
On Sat, 27 Oct 2007 04:55:00 -0700, Peter Bromberg [C# MVP]
<pbromberg@.yahoo.yohohhoandabottleofrum.comwrote:

Quote:

Originally Posted by

>Versus,
>The bottom line is that "\r\n" means nothing in HTML - you have to change it
>to "<br/>" -- which means you need to pre-process your string with
>.Replace("\r\n", "<br/>");
>
>-- Peter
>Recursion: see Recursion
>site: http://www.eggheadcafe.com
>unBlog: http://petesbloggerama.blogspot.com
>BlogMetaFinder: http://www.blogmetafinder.com


Actually, newlines may make a lot of sense when you want your HTML to
be easily understood if you do a view source on the html page ...

--
http://bytes.thinkersroom.com
On 27 okt, 14:54, "Lloyd Sheen" <a...@.b.cwrote:

Quote:

Originally Posted by

"versus" <tenc...@.dibin.karawrote in message
>
news:ee99xTJGIHA.4808@.TK2MSFTNGP05.phx.gbl...
>

Quote:

Originally Posted by

Thanks for answering. Replace(Environment.NewLine,"<br>") already works
for that problem. But i cannot see html tags as regular text. I want them
to be displayed not parsed with htmlparser.


>

Quote:

Originally Posted by

Let me explain again. I have an sql db table with columns that has both
environment.newline(\r\n) and html tags. I want newlines to break lines
and html tags to be displayed at the same time.


>

Quote:

Originally Posted by

"Peter Bromberg [C# MVP]" <pbromb...@.yahoo.yohohhoandabottleofrum.com>
wrote in message
news:4CA1F3DF-BB2B-479B-8025-69154C4984C5@.microsoft.com...

Quote:

Originally Posted by

Versus,
The bottom line is that "\r\n" means nothing in HTML - you have to change
it
to "<br/>" -- which means you need to pre-process your string with
.Replace("\r\n", "<br/>");


>

Quote:

Originally Posted by

Quote:

Originally Posted by

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com


>

Quote:

Originally Posted by

Quote:

Originally Posted by

"versus" wrote:


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>Hi


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>I have a table column that has multiple lines (\r\n) and html tags in
>it. I
>want to display it in a div and label that html tags can be seen and
>newlines should work.
>If i use div.innerHTML newlines are lost and html tags doesn't show.
>If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks
>works
>but html tags doesn't show.
>If i use div.innerText again newlines and html tags are lost.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>What can i do?


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>Thanks


>
I think if you use the <pretag to wrap your code it will honor the CRLF
and show the tags as if they are text within the <pre></pretags.
>
Hope this helps
LS


That's correct but the problem lies elsewhere.
If you update a <pretag with innerHTML, Internet Explorer will
remove the \n's before it's in the <pretag.