Thursday, March 29, 2012
html image percentage issue
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!
Saturday, March 24, 2012
html email not sending properly
Am I doing something wrong? All my other emails seem to send fine.
Thanks for any assistance.
mike123
hello,Dim objMail As New MailMessage()
objMail.BodyFormat = MailFormat.Html
SmtpMail.Send("bob@dotnet.itags.org.hotmail.com", "admin@dotnet.itags.org.123.com", "subject", "<html><body><br><br>Username: <a href='http://www.123.com/a.aspx?userID=" & CStr(Session("id#")) & "' target='_blank'>" & CStr(Session("id")) & "</a><br><br>" & Request.Form("message") & "</body></html>")
objMail = Nothing
The way you are using the SmtpMail.Send would ignore objmail making it obsolete and useless...
try:
Dim objMail As New MailMessage()objMail.BodyFormat = MailFormat.Html
objMail.To = "whoever@.mail.com"
objMail.From = "whoeveritsfrom@.mail.com"objMail.Subject = "Subject Line"
objMail.Body = "<html><body>YOUR HTML HERE</BODY></HTML
SmtpMail.Send(objMail)objMail = Nothing
Hope that helps
The version of SmtpMail.Send you are calling is only a shortcut that sends its own mail message. Under the covers, it creates a MailMessage object, fills it with the parameters you passed in, and sends it. So, it does not use the MailMessage object you created just before calling SmtpMail.Send. And, this method assumes the body type is text.
Instead, you should fill in the MailMessage object you created, and pass it into SmtpMail.Send, as follows:
Dim objMail as New MailMessage()
objMail.BodyFormat = MailFormat.Html
objMail.From = "bob@.hotmail.com"
objMail.To = "admin@.123.com"
objMail.Subject = "subject"
objMail.Body = "......"
SmtpMail.Send(objMail)
awesome, thanks!
Wednesday, March 21, 2012
HTML 4.01 Schema in VS2005
When I set the target schema for validation to HTML 4.01, I receive closing
tag errors.
Example:
Validation (HTML 4.01): Empty elements such as 'meta' must end with />.
I do not believe that is the correct validation. Empty elements in HTML 4.01
should not contain closing tags. Am I mistaken?
Regards,
Fred Chateau
http://hotelmotelnow.comre:
> Empty elements in HTML 4.01 should not contain closing tags. Am I mistaken?[/color
]
Not all elements are subject to that.
http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.1
Some HTML element types allow authors to omit end tags (e.g., the P and LI e
lement types).
The HTML DTD indicates for each element type whether the end tag is required
.
Some HTML element types have no content.
For example, the line break element BR has no content; its only role is to t
erminate a line of text.
Such empty elements never have end tags.
The Meta element, however, needs end tags because it should never be an empt
y element.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Fred Chateau" <webmaster@.hotelmotelnow.com> wrote in message
news:%23wq1AVpOHHA.3268@.TK2MSFTNGP03.phx.gbl...
> Is there a problem with the HTML 4.01 schema in Visual Studio 2005?
> When I set the target schema for validation to HTML 4.01, I receive closin
g tag errors.
> Example:
> Validation (HTML 4.01): Empty elements such as 'meta' must end with />.
> I do not believe that is the correct validation. Empty elements in HTML 4.
01 should not contain
> closing tags. Am I mistaken?
> --
> Regards,
> Fred Chateau
> http://hotelmotelnow.com
>
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote ...
> For example, the line break element BR has no content; its only role is to
> terminate a line of text.
> Such empty elements never have end tags.
Thank you. I thought that was the case.
My point still is that VS 2005 HTML 4.01 validation is requiring ALL tags to
be closed, including break tags and image tags, in a manner similar to XHTML
1.1 validation.
Is it my installation or is this schema incorrect? (I am using VS 2005
Standard Edition with SP-1.)
Regards,
Fred Chateau
http://hotelmotelnow.com
HTML 4.01 Schema in VS2005
When I set the target schema for validation to HTML 4.01, I receive closing
tag errors.
Example:
Validation (HTML 4.01): Empty elements such as 'meta' must end with />.
I do not believe that is the correct validation. Empty elements in HTML 4.01
should not contain closing tags. Am I mistaken?
--
Regards,
Fred Chateau
http://hotelmotelnow.com"Juan T. Llibre" <nomailreplies@.nowhere.comwrote ...
Quote:
Originally Posted by
For example, the line break element BR has no content; its only role is to
terminate a line of text.
Such empty elements never have end tags.
Thank you. I thought that was the case.
My point still is that VS 2005 HTML 4.01 validation is requiring ALL tags to
be closed, including break tags and image tags, in a manner similar to XHTML
1.1 validation.
Is it my installation or is this schema incorrect? (I am using VS 2005
Standard Edition with SP-1.)
--
Regards,
Fred Chateau
http://hotelmotelnow.com
re:
Quote:
Originally Posted by
Empty elements in HTML 4.01 should not contain closing tags. Am I mistaken?
Not all elements are subject to that.
http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.1
Some HTML element types allow authors to omit end tags (e.g., the P and LI element types).
The HTML DTD indicates for each element type whether the end tag is required.
Some HTML element types have no content.
For example, the line break element BR has no content; its only role is to terminate a line of text.
Such empty elements never have end tags.
The Meta element, however, needs end tags because it should never be an empty element.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Fred Chateau" <webmaster@.hotelmotelnow.comwrote in message
news:%23wq1AVpOHHA.3268@.TK2MSFTNGP03.phx.gbl...
Quote:
Originally Posted by
Is there a problem with the HTML 4.01 schema in Visual Studio 2005?
>
When I set the target schema for validation to HTML 4.01, I receive closing tag errors.
>
Example:
Validation (HTML 4.01): Empty elements such as 'meta' must end with />.
>
I do not believe that is the correct validation. Empty elements in HTML 4.01 should not contain
closing tags. Am I mistaken?
>
--
Regards,
>
Fred Chateau
http://hotelmotelnow.com
>
>