Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Thursday, March 29, 2012

html image percentage issue

I am unable display an image by percent. No matter what method I try,
I receive the following error.

Input string was not in the correct format.

No matter what method I use, I cannot get this to show up in a percent
format. What am I missing here.

currentStatusImage.Src = "../builds/images/green.gif"
currentStatusImage.Width = "60%"

Thanks.currentStatusImage.Width is expecting a Unit, not a string, so you need to
do a Unit.Parse("60%") or a Unit.Percentage(60).

HTH,

Bill Priess

On 23 Jul 2003 13:29:33 -0700, Chris <chrisp@.webpositive.com> wrote:

> I am unable display an image by percent. No matter what method I try,
> I receive the following error.
> Input string was not in the correct format.
> No matter what method I use, I cannot get this to show up in a percent
> format. What am I missing here.
> currentStatusImage.Src = "../builds/images/green.gif"
> currentStatusImage.Width = "60%"
> Thanks.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
I get an error stating that unit cannot convert to an integer, on both of
those attempts.

"Bill Priess" <no.spam@.nospam.com> wrote in message
news:oprsr572hkcimqky@.localhost...
> currentStatusImage.Width is expecting a Unit, not a string, so you need to
> do a Unit.Parse("60%") or a Unit.Percentage(60).
> HTH,
> Bill Priess
> On 23 Jul 2003 13:29:33 -0700, Chris <chrisp@.webpositive.com> wrote:
> > I am unable display an image by percent. No matter what method I try,
> > I receive the following error.
> > Input string was not in the correct format.
> > No matter what method I use, I cannot get this to show up in a percent
> > format. What am I missing here.
> > currentStatusImage.Src = "../builds/images/green.gif"
> > currentStatusImage.Width = "60%"
> > Thanks.
>
> --
> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
From the documentation:

HtmlImage.Width Property

Gets or sets the width of the image.

Public Property Width As Integer

Property Value

The width of the image.

--
John Saunders
Internet Engineer
john.saunders@.surfcontrol.com

"Chris" <chrisp@.webpositive.com> wrote in message
news:1058997574.400832@.sj-nntpcache-5...
> I get an error stating that unit cannot convert to an integer, on both of
> those attempts.
>
> "Bill Priess" <no.spam@.nospam.com> wrote in message
> news:oprsr572hkcimqky@.localhost...
> > currentStatusImage.Width is expecting a Unit, not a string, so you need
to
> > do a Unit.Parse("60%") or a Unit.Percentage(60).
> > HTH,
> > Bill Priess
> > On 23 Jul 2003 13:29:33 -0700, Chris <chrisp@.webpositive.com> wrote:
> > > I am unable display an image by percent. No matter what method I try,
> > > I receive the following error.
> > > > Input string was not in the correct format.
> > > > No matter what method I use, I cannot get this to show up in a percent
> > > format. What am I missing here.
> > > > currentStatusImage.Src = "../builds/images/green.gif"
> > > currentStatusImage.Width = "60%"
> > > > Thanks.
> > > --
> > Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
It does, the sdk also states that you can also set the value as a
percentage. The problem is that it doesn't give an example or any
detail to that.

"By default, the Width property is expressed in pixels, but it can
also be expressed as a percentage of the window size." - straight from
the windows sdk, and that's all it has to say about it. But how??

http://msdn.microsoft.com/library/d...idthtop ic.asp

"John Saunders" <john.saunders@.surfcontrol.com> wrote in message news:<Ouy$DqWUDHA.2308@.TK2MSFTNGP12.phx.gbl>...
> From the documentation:
> HtmlImage.Width Property
> Gets or sets the width of the image.
> Public Property Width As Integer
> Property Value
> The width of the image.
> --
> John Saunders
> Internet Engineer
> john.saunders@.surfcontrol.com
>
> "Chris" <chrisp@.webpositive.com> wrote in message
> news:1058997574.400832@.sj-nntpcache-5...
> > I get an error stating that unit cannot convert to an integer, on both of
> > those attempts.
> > "Bill Priess" <no.spam@.nospam.com> wrote in message
> > news:oprsr572hkcimqky@.localhost...
> > > currentStatusImage.Width is expecting a Unit, not a string, so you need
> to
> > > do a Unit.Parse("60%") or a Unit.Percentage(60).
> > > > HTH,
> > > > Bill Priess
> > > > On 23 Jul 2003 13:29:33 -0700, Chris <chrisp@.webpositive.com> wrote:
> > > > > I am unable display an image by percent. No matter what method I try,
> > > > I receive the following error.
> > > > > > Input string was not in the correct format.
> > > > > > No matter what method I use, I cannot get this to show up in a percent
> > > > format. What am I missing here.
> > > > > > currentStatusImage.Src = "../builds/images/green.gif"
> > > > currentStatusImage.Width = "60%"
> > > > > > Thanks.
> > > > > > > > --
> > > Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
It seems you've found a documentation error.

An integer is an integer, not a Unit. You can't use percentage in an
HtmlImage.

John Saunders
john.saunders@.surfcontrol.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
It seems you've found a documentation error.

An integer is an integer, not a Unit. You can't use percentage in an
HtmlImage.

John Saunders
john.saunders@.surfcontrol.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Any ideas on how to get around this. In addition to this being an issue,
when I attempt to do the following ( going back to my asp classic way of
thinking ) :

<img border="0" id="currentStatusImage" src="http://pics.10026.com/?src=<% = srcInfo %> width="<% =
widthInfo %>%" height="6" runat="server"
I still get the integer error. I'd rather not make this a static image but,
the list of ideas grows smaller. Thanks.

"John Saunders" <john.saunders@.surfcontrol.com> wrote in message
news:e5PAL8dUDHA.1484@.TK2MSFTNGP12.phx.gbl...
> It seems you've found a documentation error.
> An integer is an integer, not a Unit. You can't use percentage in an
> HtmlImage.
> John Saunders
> john.saunders@.surfcontrol.com
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
You're still getting the error because you've still got the control marked
as runat="server", which means it's an HtmlImage, which means that the Width
property is an integer.

Do you really need the image to be a server control?

And why not use style="WIDTH:100%" :

currentStatusImage.Style["WIDTH"] = "100%"

--
John Saunders
Internet Engineer
john.saunders@.surfcontrol.com

"Chris" <chrisp@.webpositive.com> wrote in message
news:1059061676.370476@.sj-nntpcache-3...
> Any ideas on how to get around this. In addition to this being an issue,
> when I attempt to do the following ( going back to my asp classic way of
> thinking ) :
> <img border="0" id="currentStatusImage" src="http://pics.10026.com/?src=<% = srcInfo %> width="<% =
> widthInfo %>%" height="6" runat="server">
> I still get the integer error. I'd rather not make this a static image
but,
> the list of ideas grows smaller. Thanks.
>
> "John Saunders" <john.saunders@.surfcontrol.com> wrote in message
> news:e5PAL8dUDHA.1484@.TK2MSFTNGP12.phx.gbl...
> > It seems you've found a documentation error.
> > An integer is an integer, not a Unit. You can't use percentage in an
> > HtmlImage.
> > John Saunders
> > john.saunders@.surfcontrol.com
> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!

Monday, March 26, 2012

Html Form Help!

Hi,

I have an .aspx page that contains an html form. Below is the code used for the form:

<form id="Shoes" method="post" runat="server">
<label for="q">Search:</label><br />
<asp:textbox id="q" maxlength="100" runat="server"/><br />
<label for="sz">Shoe Size (US):</label><br />
<asp:dropdownlist id="sz" runat="server"/><br /> <!-- this control is populated programmatically -->
<label for="tp">Type:</label><br />
<asp:dropdownlist id="tp" runat="server">
<asp:listitem value="24">Any</asp:listitem>
<asp:listitem value="2293">Athletic</asp:listitem>
<asp:listitem value="31920">Athletic-Inspired</asp:listitem>
</asp:dropdownlist><br />
<label for="cd">Condition:</label><br />
<asp:dropdownlist id="cd" runat="server">
<asp:listitem value="24">Any</asp:listitem>
<asp:listitem value="31919">New</asp:listitem>
</asp:dropdownlist><br />
<input type="submit" value="Search"/>
</form
All is good here.

But should I specify any form variables and perform a postback, I can't access any of the form
controls using either the Request.Form collection or using Request.Querystring collection.

I have no idea why this is happening. Can anyone help this newbie?

Thanks,
RoshawnI don't see anything particularly wrong with your form ASPX tag code.
You have not shown how you expect to access these values on a postback.

The typicaly pattern is:

Page_Load( ...)
{
if(IsPostBack)
{
//get values here

}

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

"Roshawn Dawson" wrote:

> Hi,
> I have an .aspx page that contains an html form. Below is the code used for the form:
>
> <form id="Shoes" method="post" runat="server">
> <label for="q">Search:</label><br />
> <asp:textbox id="q" maxlength="100" runat="server"/><br />
> <label for="sz">Shoe Size (US):</label><br />
> <asp:dropdownlist id="sz" runat="server"/><br /> <!-- this control is populated programmatically -->
> <label for="tp">Type:</label><br />
> <asp:dropdownlist id="tp" runat="server">
> <asp:listitem value="24">Any</asp:listitem>
> <asp:listitem value="2293">Athletic</asp:listitem>
> <asp:listitem value="31920">Athletic-Inspired</asp:listitem>
> </asp:dropdownlist><br />
> <label for="cd">Condition:</label><br />
> <asp:dropdownlist id="cd" runat="server">
> <asp:listitem value="24">Any</asp:listitem>
> <asp:listitem value="31919">New</asp:listitem>
> </asp:dropdownlist><br />
> <input type="submit" value="Search"/>
> </form>
>
> All is good here.
> But should I specify any form variables and perform a postback, I can't access any of the form
> controls using either the Request.Form collection or using Request.Querystring collection.
> I have no idea why this is happening. Can anyone help this newbie?
> Thanks,
> Roshawn
Hmm...

Your suggestion is simple enough. I though that you don't always have to check if the page was
posted back. I thought that I could slap some code onto the page and simply use the Request object.
Seems I was wrong.

Thanks for the tip, Peter. :-)

Peter Bromberg [C# MVP] wrote:
> I don't see anything particularly wrong with your form ASPX tag code.
> You have not shown how you expect to access these values on a postback.
> The typicaly pattern is:
> Page_Load( ...)
> {
> if(IsPostBack)
> {
> //get values here
> }
> Peter
I appreciate your suggestion, but unfortunately nothing works. I still cannot use the Request.Form
collection or the Request.QueryString collection.

Thanks anyway,
Roshawn
If you want to post a "Short but complete" code sample, sombody will review
it. How about your AutoEventWireup directive, how is that set? Have you set a
breakpont on the code line that you expect to see executed, to see if it is
actually reached? Have you tried using the locals window to look at values?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

"Roshawn Dawson" wrote:

> I appreciate your suggestion, but unfortunately nothing works. I still cannot use the Request.Form
> collection or the Request.QueryString collection.
> Thanks anyway,
> Roshawn
Hi, Roshawn.

What you are looking for is the Request.Params collection.

See example usage at :
http://www.informit.com/articles/ar...2&seqNum=4&rl=1

http://www.hanselman.com/blog/ASPNE...leDecoding.aspx

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Roshawn Dawson" <udrago@.bellsouth.net> wrote in message
news:uxxSlDzcGHA.4072@.TK2MSFTNGP05.phx.gbl...
>I appreciate your suggestion, but unfortunately nothing works. I still cannot use the Request.Form
>collection or the Request.QueryString collection.
> Thanks anyway,
> Roshawn
Hi Juan,

I've done some more testing, and what I found is strange. Both the Request.Params and the
Request.QueryString collections are empty.

I have no idea why this is. Could setting the EnableViewState property to true have an effect on
these collections?

Thanks,
Roshawn

Juan T. Llibre wrote:
> Hi, Roshawn.
> What you are looking for is the Request.Params collection.
> See example usage at :
> http://www.informit.com/articles/ar...2&seqNum=4&rl=1
> http://www.hanselman.com/blog/ASPNE...leDecoding.aspx
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaol : http://asp.net.do/foros/
Never mind; I figured it out. Silly me, I didn't supply a name attribute for any of the form's
controls. That's why I couldn't get any data.

And to think that I need a hairpiece for nothing (I pulled all of it out). :-(

Thanks gang,
Roshawn
heh, heh...
Been there, done that!

I bet it felt good to finally figure it out!

:-)

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Roshawn Dawson" <udrago@.bellsouth.net> wrote in message
news:%23WISox%23cGHA.536@.TK2MSFTNGP02.phx.gbl...
> Never mind; I figured it out. Silly me, I didn't supply a name attribute for any of the form's
> controls. That's why I couldn't get any data.
> And to think that I need a hairpiece for nothing (I pulled all of it out). :-(
> Thanks gang,
> Roshawn

Html Form Help!

Hi,
I have an .aspx page that contains an html form. Below is the code used for
the form:
<form id="Shoes" method="post" runat="server">
<label for="q">Search:</label><br />
<asp:textbox id="q" maxlength="100" runat="server"/><br />
<label for="sz">Shoe Size (US):</label><br />
<asp:dropdownlist id="sz" runat="server"/><br /> <!-- this control is popu
lated programmatically -->
<label for="tp">Type:</label><br />
<asp:dropdownlist id="tp" runat="server">
<asp:listitem value="24">Any</asp:listitem>
<asp:listitem value="2293">Athletic</asp:listitem>
<asp:listitem value="31920">Athletic-Inspired</asp:listitem>
</asp:dropdownlist><br />
<label for="cd">Condition:</label><br />
<asp:dropdownlist id="cd" runat="server">
<asp:listitem value="24">Any</asp:listitem>
<asp:listitem value="31919">New</asp:listitem>
</asp:dropdownlist><br />
<input type="submit" value="Search"/>
</form>
All is good here.
But should I specify any form variables and perform a postback, I can't acce
ss any of the form
controls using either the Request.Form collection or using Request.Querystri
ng collection.
I have no idea why this is happening. Can anyone help this newbie?
Thanks,
RoshawnI don't see anything particularly wrong with your form ASPX tag code.
You have not shown how you expect to access these values on a postback.
The typicaly pattern is:
Page_Load( ...)
{
if(IsPostBack)
{
//get values here
}
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Roshawn Dawson" wrote:

> Hi,
> I have an .aspx page that contains an html form. Below is the code used f
or the form:
>
> <form id="Shoes" method="post" runat="server">
> <label for="q">Search:</label><br />
> <asp:textbox id="q" maxlength="100" runat="server"/><br />
> <label for="sz">Shoe Size (US):</label><br />
> <asp:dropdownlist id="sz" runat="server"/><br /> <!-- this control is
populated programmatically -->
> <label for="tp">Type:</label><br />
> <asp:dropdownlist id="tp" runat="server">
> <asp:listitem value="24">Any</asp:listitem>
> <asp:listitem value="2293">Athletic</asp:listitem>
> <asp:listitem value="31920">Athletic-Inspired</asp:listitem>
> </asp:dropdownlist><br />
> <label for="cd">Condition:</label><br />
> <asp:dropdownlist id="cd" runat="server">
> <asp:listitem value="24">Any</asp:listitem>
> <asp:listitem value="31919">New</asp:listitem>
> </asp:dropdownlist><br />
> <input type="submit" value="Search"/>
> </form>
>
> All is good here.
> But should I specify any form variables and perform a postback, I can't ac
cess any of the form
> controls using either the Request.Form collection or using Request.Queryst
ring collection.
> I have no idea why this is happening. Can anyone help this newbie?
> Thanks,
> Roshawn
>
Hmm...
Your suggestion is simple enough. I though that you don't always have to ch
eck if the page was
posted back. I thought that I could slap some code onto the page and simply
use the Request object.
Seems I was wrong.
Thanks for the tip, Peter. :-)
Peter Bromberg [C# MVP] wrote:
> I don't see anything particularly wrong with your form ASPX tag code.
> You have not shown how you expect to access these values on a postback.
> The typicaly pattern is:
> Page_Load( ...)
> {
> if(IsPostBack)
> {
> //get values here
> }
> Peter
I appreciate your suggestion, but unfortunately nothing works. I still cann
ot use the Request.Form
collection or the Request.QueryString collection.
Thanks anyway,
Roshawn
If you want to post a "Short but complete" code sample, sombody will review
it. How about your AutoEventWireup directive, how is that set? Have you set
a
breakpont on the code line that you expect to see executed, to see if it is
actually reached? Have you tried using the locals window to look at values?
Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Roshawn Dawson" wrote:

> I appreciate your suggestion, but unfortunately nothing works. I still ca
nnot use the Request.Form
> collection or the Request.QueryString collection.
> Thanks anyway,
> Roshawn
>
Hi, Roshawn.
What you are looking for is the Request.Params collection.
See example usage at :
http://www.informit.com/articles/ar...2&seqNum=4&rl=1
http://www.hanselman.com/blog/ ASPN...leDecoding.aspx
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Roshawn Dawson" <udrago@.bellsouth.net> wrote in message
news:uxxSlDzcGHA.4072@.TK2MSFTNGP05.phx.gbl...
>I appreciate your suggestion, but unfortunately nothing works. I still can
not use the Request.Form
>collection or the Request.QueryString collection.
> Thanks anyway,
> Roshawn
Hi Juan,
I've done some more testing, and what I found is strange. Both the Request.
Params and the
Request.QueryString collections are empty.
I have no idea why this is. Could setting the EnableViewState property to t
rue have an effect on
these collections?
Thanks,
Roshawn
Juan T. Llibre wrote:
> Hi, Roshawn.
> What you are looking for is the Request.Params collection.
> See example usage at :
> http://www.informit.com/articles/ar...2&seqNum=4&rl=1
> http://www.hanselman.com/blog/ ASPN...leDecoding.aspx
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaol : http://asp.net.do/foros/
Never mind; I figured it out. Silly me, I didn't supply a name attribute fo
r any of the form's
controls. That's why I couldn't get any data.
And to think that I need a hairpiece for nothing (I pulled all of it out).
:-(
Thanks gang,
Roshawn
heh, heh...
Been there, done that!
I bet it felt good to finally figure it out!
:-)
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Roshawn Dawson" <udrago@.bellsouth.net> wrote in message
news:%23WISox%23cGHA.536@.TK2MSFTNGP02.phx.gbl...
> Never mind; I figured it out. Silly me, I didn't supply a name attribute
for any of the form's
> controls. That's why I couldn't get any data.
> And to think that I need a hairpiece for nothing (I pulled all of it out).
:-(
> Thanks gang,
> Roshawn

Html for control

Hi,

Is it possible to get the html for a control? ie. return to a string what
the RenderControl method would output.

Thanks

DonalIf it's your own control you should be able to get it from within the render
event.
If it's not your control then you should be able to call the RenderControl
method of the control to get its output.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Donal McWeeney" <donal_mcweeney@.NO-SP-AM.aimware.com> wrote in message
news:Oea88pykDHA.2676@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Is it possible to get the html for a control? ie. return to a string what
> the RenderControl method would output.
> Thanks
> Donal
Thanks... think it kindof answers the question...

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:OeGaRJ0kDHA.1800@.TK2MSFTNGP10.phx.gbl...
> If it's your own control you should be able to get it from within the
render
> event.
> If it's not your control then you should be able to call the RenderControl
> method of the control to get its output.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
> "Donal McWeeney" <donal_mcweeney@.NO-SP-AM.aimware.com> wrote in message
> news:Oea88pykDHA.2676@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> > Is it possible to get the html for a control? ie. return to a string
what
> > the RenderControl method would output.
> > Thanks
> > Donal

HTML encoding method?

hello,
i need to do some HTML encoding on some strings. not UrlEncoding, mind
you, but HTML encoding. ie:
"&" to "&"
"<" to "<"
...etc. does anyone know of a good way to do this, other than manual
string replacements? what of decoding back into plain text?
thanks,
mattHttpServerUtility.HtmlEncode() is what you're looking for. Here's MS
documentation on it:
http://msdn2.microsoft.com/en-gb/library/w3te6wfz.aspx
I just googled [.NET + HTMLEncode] and got over 200,000 links on this... the
above is just one of them
HTH
<matt@.mailinator.com> wrote in message
news:1171050927.250882.317160@.h3g2000cwc.googlegroups.com...
> hello,
> i need to do some HTML encoding on some strings. not UrlEncoding, mind
> you, but HTML encoding. ie:
> "&" to "&"
> "<" to "<"
> ...etc. does anyone know of a good way to do this, other than manual
> string replacements? what of decoding back into plain text?
>
> thanks,
> matt
>
On Feb 9, 2:20 pm, "Bob Johnson" <A...@.B.com> wrote:
> HttpServerUtility.HtmlEncode() is what you're looking for. Here's MS
> documentation on it:
ah sweet, thanks.

> I just googled [.NET + HTMLEncode] and got over 200,000 links on this... t
he
> above is just one of them
...i had tried some other keyword variations, didnt come up w/ the
MSDN result; but sure enough thats the documentation i needed.
thanks
matt

HTML encoding method?

hello,

i need to do some HTML encoding on some strings. not UrlEncoding, mind
you, but HTML encoding. ie:

"&" to "&"
"<" to "<"

...etc. does anyone know of a good way to do this, other than manual
string replacements? what of decoding back into plain text?

thanks,
mattHttpServerUtility.HtmlEncode() is what you're looking for. Here's MS
documentation on it:

http://msdn2.microsoft.com/en-gb/library/w3te6wfz.aspx
I just googled [.NET + HTMLEncode] and got over 200,000 links on this... the
above is just one of them

HTH

<matt@.mailinator.comwrote in message
news:1171050927.250882.317160@.h3g2000cwc.googlegro ups.com...

Quote:

Originally Posted by

hello,
>
i need to do some HTML encoding on some strings. not UrlEncoding, mind
you, but HTML encoding. ie:
>
"&" to "&"
"<" to "<"
>
...etc. does anyone know of a good way to do this, other than manual
string replacements? what of decoding back into plain text?
>
>
thanks,
matt
>


On Feb 9, 2:20 pm, "Bob Johnson" <A...@.B.comwrote:

Quote:

Originally Posted by

HttpServerUtility.HtmlEncode() is what you're looking for. Here's MS
documentation on it:


ah sweet, thanks.

Quote:

Originally Posted by

I just googled [.NET + HTMLEncode] and got over 200,000 links on this... the
above is just one of them


...i had tried some other keyword variations, didnt come up w/ the
MSDN result; but sure enough thats the documentation i needed.

thanks
matt