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

Thursday, March 29, 2012

Html in Asp.Net variable causeing errors

I am using this code:

Dim strPopup as String = "<script>alert('hello world');</script>"

The closing script tag is screwing up the vb code. I don't know why..This is a protection to avoid script tags in asp.net code which can break the server-side scripts in ASP.NET (when a </script> is detected). Use this little workaround to solve the problem:

Dim strPopup as String = "<script>alert('hello world');</script"+">"
.
Another solution is to avoid the direct use of <script> tags by using the properties of, for example, the <body> section of the page:

<body onload="alert('hello world');">
...

HTML in a variable

Im using asp on a win2k3 server. I would like to put a lot of html into 1 variable. I get an error when i try to do it my way.


'Here is an example of what I would like to do, kinda.
application="<html>
<head>
<title>Join</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="http://links.10026.com/?link=join.css" rel="stylesheet" type="text/css">
</head>"


'Here is the error.
Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/cfcs/join/mail.asp, line 17

application="<html>
------^

I was wondering if anyone could suggest an effective method of doing this.you should replace the double quotes(") by a single quote(') and instead of adding new line for the variable value you can use <br
application="<html><br><head><br><title>Join</title><br><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><br><link href='join.css' rel='stylesheet' type='text/css'><br></head></html>"

Hope this helps
Nitasha

------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
this isn't an asp forum

application = "<html>" & vbCrLf & "<head>" & vbCrLf & "<title>Join</title>" & vbCrLf & "<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">" & _
vbCrLf & "<link href="http://links.10026.com/?link="join.css"" rel=""stylesheet"" type=""text/css"">" & vbCrLf & "</head>"
The new lines in the string are not understood by VB.

HTML IMG vs ASP:IMAGE performance

I have no need to have server control over an image.
What is the best choice to use HTML img tag or asp:image for best
performance?
thanks,
Goncalo BoleoHTML controls provide slightly better performance than Web Controls, so go
with the img tag.
Here's more info:
http://SteveOrr.net/faq/3in1.aspx#HTMLvsWeb
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Gonalo Bolo" <gboleo@.netcabo.pt> wrote in message
news:el6Fu7PRFHA.356@.TK2MSFTNGP14.phx.gbl...
>I have no need to have server control over an image.
> What is the best choice to use HTML img tag or asp:image for best
> performance?
> thanks,
> Goncalo Boleo
>
If there's no need to have a server control, then just use a <img> tag (prim
arily
for simplicity, even though it is faster but it's negligible). If you are
using a server control there's essentially no difference between the HtmlCon
trols
and the WebContorls.
-Brock
DevelopMentor
http://staff.develop.com/ballen

> I have no need to have server control over an image.
> What is the best choice to use HTML img tag or asp:image for best
> performance?
> thanks,
> Goncalo Boleo

HTML IMG vs ASP:IMAGE performance

I have no need to have server control over an image.
What is the best choice to use HTML img tag or asp:image for best
performance?

thanks,
Goncalo BoleoHTML controls provide slightly better performance than Web Controls, so go
with the img tag.

Here's more info:
http://SteveOrr.net/faq/3in1.aspx#HTMLvsWeb

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Gonalo Bolo" <gboleo@.netcabo.pt> wrote in message
news:el6Fu7PRFHA.356@.TK2MSFTNGP14.phx.gbl...
>I have no need to have server control over an image.
> What is the best choice to use HTML img tag or asp:image for best
> performance?
> thanks,
> Goncalo Boleo
If there's no need to have a server control, then just use a <img> tag (primarily
for simplicity, even though it is faster but it's negligible). If you are
using a server control there's essentially no difference between the HtmlControls
and the WebContorls.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> I have no need to have server control over an image.
> What is the best choice to use HTML img tag or asp:image for best
> performance?
> thanks,
> Goncalo Boleo

HTML IMG SRC

Hello,
I am dealing with a lot of published pages on a particular website.
(web-editor/publish/archive) It is easier for me to remove all of the
"../../imgageDir/image001.jpg" references and replace then with
http://www.aWebsite.com/imageDir/image001.jpg...
Will this slow down my website or the rendering of the html pages. It is
all happening on the same website (no external images)
ie,
<html><body>
<img src="http://pics.10026.com/?src=../../imageDir/image001.jpg">
<img src="http://pics.10026.com/?src=../../imageDir/image002.jpg">
</body></html>
---
OR
---
<html><body>
<img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image001.jpg">
<img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image002.jpg">
</body></html>
which one is faster?
THanks,
PaulNiether is faster. Both are the same.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"psb" <pbellman@.msn.com> wrote in message
news:%23gciQEeFFHA.2600@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I am dealing with a lot of published pages on a particular website.
> (web-editor/publish/archive) It is easier for me to remove all of the
> "../../imgageDir/image001.jpg" references and replace then with
> http://www.aWebsite.com/imageDir/image001.jpg...
> Will this slow down my website or the rendering of the html pages. It is
> all happening on the same website (no external images)
> ie,
> <html><body>
> <img src="http://pics.10026.com/?src=../../imageDir/image001.jpg">
> <img src="http://pics.10026.com/?src=../../imageDir/image002.jpg">
> </body></html>
> ---
> OR
> ---
> <html><body>
> <img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image001.jpg">
> <img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image002.jpg">
> </body></html>
> which one is faster?
> THanks,
> Paul
>

HTML IMG SRC

Hello,
I am dealing with a lot of published pages on a particular website.
(web-editor/publish/archive) It is easier for me to remove all of the
"../../imgageDir/image001.jpg" references and replace then with
http://www.aWebsite.com/imageDir/image001.jpg...

Will this slow down my website or the rendering of the html pages. It is
all happening on the same website (no external images)

ie,

<html><body>
<img src="http://pics.10026.com/?src=../../imageDir/image001.jpg">
<img src="http://pics.10026.com/?src=../../imageDir/image002.jpg">
</body></html>
------------
OR
------------
<html><body>
<img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image001.jpg">
<img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image002.jpg">
</body></html
which one is faster?
THanks,
PaulNiether is faster. Both are the same.

--
HTH,

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

"psb" <pbellman@.msn.com> wrote in message
news:%23gciQEeFFHA.2600@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I am dealing with a lot of published pages on a particular website.
> (web-editor/publish/archive) It is easier for me to remove all of the
> "../../imgageDir/image001.jpg" references and replace then with
> http://www.aWebsite.com/imageDir/image001.jpg...
> Will this slow down my website or the rendering of the html pages. It is
> all happening on the same website (no external images)
> ie,
> <html><body>
> <img src="http://pics.10026.com/?src=../../imageDir/image001.jpg">
> <img src="http://pics.10026.com/?src=../../imageDir/image002.jpg">
> </body></html>
> ------------
> OR
> ------------
> <html><body>
> <img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image001.jpg">
> <img src="http://pics.10026.com/?src=http://www.aWebsite.com/imageDir/image002.jpg">
> </body></html>
> which one is faster?
> THanks,
> Paul

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!

HTML Image Control (and VB vs JavaScript)

I'm a VB programmer, somewhat new to VB.Net, and completely new to (and clueless with) ASP.Net

I'm trying to build a simple game as a programming exercise. I have HTML Image Controls in place, but when I look at the code behind, there doesnt seem to be an OnClick event. How can I add one ?

Also, it seems possible to add a client side OnClick event from HTML View. But everytime I try it, Visual Studio wants JavaScript. This seems pointless to me, at best I can fumble my way through JavaScript, but as a VB programmer, what i WANT to do is write this in VB. There has to be a way to change the language to VB, right ?

BTW, I notice in some language drop downs (that I dont yet know how to use) there is "vb" and "visualbasic". What's that all about ?

Thanks, (a very frustrated) AARRGGHHH> I have HTML Image Controls in place, but when I look at the code behind, there doesnt seem to be an OnClick event. How can I add one ?

Change your HTML Image controls intoImage Buttons, which do indeed expose an onClick event.

> There has to be a way to change the (Javascript) language to VB, right ?

Wrong. Javascript works with the HTML's document model. It is client-side script. For example, using Javascript you can bounce an image of a ball around the screen. Such client-side operations are meaningless to a server-side language such as VB.NET.

For example, if you're making an internet game, you'd really want use as much Javascript as possible. If every "gamer action" causes the page to return to the server, it will be a slow game indeed.

> BTW, I notice in some language drop downs (that I dont yet know how to use) there is "vb" and "visualbasic". What's that all about ?

No idea. There's a few "flavours" of Visual Basic ... so, the dropdown options could mean anything.

As you're new to ASP.NET, you might like to work through theQuickStart Tutorials, as they have been specifically designed to teach you the fundamentals.

I hope this helps.
> Change your HTML Image controls into Image Buttons, which do indeed expose an onClick event.

Thanks for the suggestion, that seems to be working out well.

>> There has to be a way to change the (Javascript) language to VB, right ?

>Wrong. Javascript works with the HTML's document model. It is client-side script.

In that case, I'm guessing I can probably at least use VBScript for client side issues, correct ? Do I just change the language attribute to "VBScript" ?

> For example, if you're making an internet game, you'd really want use as much Javascript as possible. If every "gamer action" causes the page to return to the server, it will be a slow game indeed.

It's not an action game, just a simple question and answer game, so server side should work out fine.

Thanks again for your help
> I'm guessing I can probably at least use VBScript for client side issues, correct?

You could, but you shouldn't. Read:Good or Evil? VBScript on the client side.

Javascript is the way to go. In your case, with a question and answer game, there's probably little if any client-side scripting necessary.

Understanding Javascript is anextremely valuable skill for anyone creating websites or web applications.

I hope this helps.

HTML Image buttons

Hello,

I am using HTML image buttons in my web application and
when I run it, all my image buttons are showing up with a
border.

I tried using border="0" with the input tag, but it is
deprecated.

<input border="0" src="http://pics.10026.com/?src=../images/next.jpg"
type="image" onclick="return checkPage('next');"
runat="server"/
Can anyone suggest me an alternative?

Thanks!

HTML Image buttons

Hello,

I am using HTML image buttons in my web application and
when I run it, all my image buttons are showing up with a
border.

I tried using border="0" with the input tag, but it is
deprecated.

<input border="0" src="http://pics.10026.com/?src=../images/next.jpg"
type="image" onclick="return checkPage('next');"
runat="server"/
Can anyone suggest me an alternative?

Thanks!Hello,

Never had this issue, but you can try applying the "style" attribute
disabling any borders for the input control (provided the border is not the
focus frame indicating the control the keyboard input will be directed to).
You can inhibit the focus rect by adding HIDEFOCUS="true" but this will work
in IE only.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"itsme" <anonymous@.discussions.microsoft.com> wrote in message
news:082401c3984e$d5350a80$a101280a@.phx.gbl...
> Hello,
> I am using HTML image buttons in my web application and
> when I run it, all my image buttons are showing up with a
> border.
> I tried using border="0" with the input tag, but it is
> deprecated.
> <input border="0" src="http://pics.10026.com/?src=../images/next.jpg"
> type="image" onclick="return checkPage('next');"
> runat="server"/>
> Can anyone suggest me an alternative?
> Thanks!
Hello,

Never had this issue, but you can try applying the "style" attribute
disabling any borders for the input control (provided the border is not the
focus frame indicating the control the keyboard input will be directed to).
You can inhibit the focus rect by adding HIDEFOCUS="true" but this will work
in IE only.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"itsme" <anonymous@.discussions.microsoft.com> wrote in message
news:082401c3984e$d5350a80$a101280a@.phx.gbl...
> Hello,
> I am using HTML image buttons in my web application and
> when I run it, all my image buttons are showing up with a
> border.
> I tried using border="0" with the input tag, but it is
> deprecated.
> <input border="0" src="http://pics.10026.com/?src=../images/next.jpg"
> type="image" onclick="return checkPage('next');"
> runat="server"/>
> Can anyone suggest me an alternative?
> Thanks!

HTML If then statements?

Is it possible to determine the user's IP Address and then redirect to differant web sites using HTML? Or, can you only do this in ASP?

If so, how would you do it?

I know how to do it in vb.net using an aspx page, but I don't know how to do it using strictly HTML.

ThanksNo,

HTML is a mark up language only. Now you can use some other technologies such as asp, javascript, cgi, etc. to do this. There might also be a way to handle this at the server level also, but I am not so wise in that subject to offer a solution. Maybe someone else is.
In HTML? No, but you can use JavaScript to do it...
Check out http://www.dynamicdrive.com they have some scritps there that can do that...

TG
:wave:

html hyperlink

I have an html that I made to a hyperlink. this is the code

HTML
<SPAN class="Hyperlink"><A id="CP" runat="server">Client List</A></SPAN>
Code
CP.HRef = "Index.aspx?Page=ClientList"

Now the thing I want to do is when I click it I want to clear all my session variables. Is there any suggestionsWhy not create a linkbutton and in the code behind, have it clear the sessions,
then redirect to the page you want?

Zath
yes use the linkbutton and put this code to clear the sessions:


Session.Clear();
Response.Redirect("myotherpage.aspx");

HTML Hex Encoding

Does anyone know how and if it's possible to convert a
string like:
<div><a href="http://links.10026.com/?link=http://www.cnn.com">www.cnn.com</a></div>
<div>test string</div>
to something like this:
"\u003cdiv\u003e\u003ca href=\u0022http://www.cnn.com\u0022
\u003ewww.cnn.com\u003c/a\u003e\u003c/div\u003e\r\n\u003cdi
v\u003etest string\u003c/div\u003e"
I would like to do this using some kind of encoding
without having to escape each special character if possible
Any suggestions is greatly appreciated.
Thanksuse the HttpUtility.UrlEncode Method
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"cboekhoudt" <anonymous@.discussions.microsoft.com> wrote in message
news:ca1801c438fc$e91ca860$a001280a@.phx.gbl...
> Does anyone know how and if it's possible to convert a
> string like:
> <div><a href="http://links.10026.com/?link=http://www.cnn.com">www.cnn.com</a></div>
> <div>test string</div>
> to something like this:
> "\u003cdiv\u003e\u003ca href=\u0022http://www.cnn.com\u0022
> \u003ewww.cnn.com\u003c/a\u003e\u003c/div\u003e\r\n\u003cdi
> v\u003etest string\u003c/div\u003e"
> I would like to do this using some kind of encoding
> without having to escape each special character if possible
> Any suggestions is greatly appreciated.
> Thanks
UrlEncode would give me something like
%3cdiv%3e%3ca+href%3d%22http%3a%2f%2fwww
.cnn.com%22%
3ewww.cnn. com%3c%2fa%3e%3c%2fdiv%3e%3cdiv%3etest+s
tring%3
UrlEncode is not what I need.
I need it to escape characters that are html specific such
as < > and include " '. Other than manually replace all
these with the hex, are there any special encodings that
will do it for me?
Thanks,

>--Original Message--
>use the HttpUtility.UrlEncode Method
>--
>Swanand Mokashi
>Microsoft Certified Solution Developer (.NET)
>Microsoft Certified Application Developer (.NET)
>http://www.swanandmokashi.com/
>http://www.swanandmokashi.com/HomePage/WebServices/
>Home of the Stock Quotes, Quote of the day and Horoscope
web services
>"cboekhoudt" <anonymous@.discussions.microsoft.com> wrote
in message
>news:ca1801c438fc$e91ca860$a001280a@.phx.gbl...
href=\u0022http://www.cnn.com\u0022
\u003ewww.cnn.com\u003c/a\u003e\u003c/div\u003e\r\n\u003cdi
possible
>
>.
>

HTML Hex Encoding

Does anyone know how and if it's possible to convert a
string like:

<div><a href="http://links.10026.com/?link=http://www.cnn.com">www.cnn.com</a></div>
<div>test string</div
to something like this:

"\u003cdiv\u003e\u003ca href=\u0022http://www.cnn.com\u0022
\u003ewww.cnn.com\u003c/a\u003e\u003c/div\u003e\r\n\u003cdi
v\u003etest string\u003c/div\u003e"

I would like to do this using some kind of encoding
without having to escape each special character if possible

Any suggestions is greatly appreciated.
Thanksuse the HttpUtility.UrlEncode Method

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"cboekhoudt" <anonymous@.discussions.microsoft.com> wrote in message
news:ca1801c438fc$e91ca860$a001280a@.phx.gbl...
> Does anyone know how and if it's possible to convert a
> string like:
> <div><a href="http://links.10026.com/?link=http://www.cnn.com">www.cnn.com</a></div>
> <div>test string</div>
> to something like this:
> "\u003cdiv\u003e\u003ca href=\u0022http://www.cnn.com\u0022
> \u003ewww.cnn.com\u003c/a\u003e\u003c/div\u003e\r\n\u003cdi
> v\u003etest string\u003c/div\u003e"
> I would like to do this using some kind of encoding
> without having to escape each special character if possible
> Any suggestions is greatly appreciated.
> Thanks
UrlEncode would give me something like
%3cdiv%3e%3ca+href%3d%22http%3a%2f%2fwww.cnn.com%2 2%
3ewww.cnn.com%3c%2fa%3e%3c%2fdiv%3e%3cdiv%3etest+s tring%3
UrlEncode is not what I need.

I need it to escape characters that are html specific such
as < > and include " '. Other than manually replace all
these with the hex, are there any special encodings that
will do it for me?

Thanks,

>--Original Message--
>use the HttpUtility.UrlEncode Method
>--
>Swanand Mokashi
>Microsoft Certified Solution Developer (.NET)
>Microsoft Certified Application Developer (.NET)
>http://www.swanandmokashi.com/
>http://www.swanandmokashi.com/HomePage/WebServices/
>Home of the Stock Quotes, Quote of the day and Horoscope
web services
>"cboekhoudt" <anonymous@.discussions.microsoft.com> wrote
in message
>news:ca1801c438fc$e91ca860$a001280a@.phx.gbl...
>> Does anyone know how and if it's possible to convert a
>> string like:
>>
>> <div><a href="http://links.10026.com/?link=http://www.cnn.com">www.cnn.com</a></div>
>> <div>test string</div>
>>
>> to something like this:
>>
>> "\u003cdiv\u003e\u003ca
href=\u0022http://www.cnn.com\u0022
>>
\u003ewww.cnn.com\u003c/a\u003e\u003c/div\u003e\r\n\u003cdi
>> v\u003etest string\u003c/div\u003e"
>>
>> I would like to do this using some kind of encoding
>> without having to escape each special character if
possible
>>
>> Any suggestions is greatly appreciated.
>> Thanks
>
>.

HTML Help-Table blues

I'm trying unsuccessfully to display in one line a start date and an end date on my form. I've been trying to do this with tables but it wants to display on two lines. I've tried several col widths, nowrap, multiple cells, and am really frustrated at this point. There is plenty of room to display it so I don't know what the problem is. Please help me. This is my latest table:

<tablewidth="100%"style="font-size: 9pt; font-family: Verdana">

<tr>

<tdnowrap="nowrap"style="width: 453px"> View Shipments From<scripttype="text/javascript">DateInput('txtFromDate',true,'MM-dd-yyyy')</script></td>

<td>To<scripttype="text/javascript">DateInput('txtToDate',true,'MM-dd-yyyy')</script></td>

</tr>

</table>

Why use tables? How about:

View Shipments From <script type="text/javascript">DateInput('txtFromDate', true, 'MM-dd-yyyy')</script>, To <script type="text/javascript">DateInput('txtToDate', true, 'MM-dd-yyyy')</script>

I haven't tried this, but i can't see why it shouldn't work. Let me know!

Yours Sincerely

Jens


I'm not sure what your DateInput javascript function does, but what you have there should display 2 columns on 1 row of a table as you would expect. Is this DateInput a javascript calendar component? If so, then it could be causing the symptoms.

html help generator for asp application

I hope somebody can give me a recommendation:

I am developing an ASP application and it should have a help icon on each form. If pressed it should open up a new page displaying the help for this form. Now I need a development tool for creating the help similar to HelpNDoc. HelpNDoc itself is nice, but it seems to be very difficult to open up the help pages in a new browser window AND show the correct help page directly. So I am looking for a tool that can create such a HTML help, it would be nice of course, if it can deliver a nice printable version of the help, too.

why dont you use the free tool which will be installed when you install Visual Studio .net in C:\Program Files\HTML Help Workshop. this tool can create .chm files which you can use easily to provide help to your users

for more info of how to use the chm file in your web application see the below link

http://www.codeguru.com/cpp/w-p/help/html/article.php/c6503/

HC


Well, that thing does not generate any table of contents for a pure html view, except for the main page. So searching and navigating through the help would be almost impossible without the CHM help viewer, so this is not a help that somebody would like to use as a pure HTML help. And furthermore, that thing is very unintuitive to use, especially for someone who just wants to write help texts and organize topics and CHM will be desupported with Vista, so that almost 8 year old, never updated 'tool' is kind of obsolete.

I am looking for a nice help generated, that will generate a help page with a navigation bar on the left and probably even search capabilities in the help, where I can link directly to pages to integrate it in my application and best would be if the help can be printed as a documentation, too.

Html Help

I'm havinf a problem with the following form tag, as for some reason it doesn't allow me to go to a different page


<%@dotnet.itags.org. Page Language="C#" %>
<html>
<head>
<title>My Page</title>
</head>
<body>
<form runat="server">
<form method="POST" action="http://www.microsoft.com">
<input type="submit" value="15" name="redirect" />
</form>
</form>
</body>
</html>

Can anyone figure why?Hi,
Place HTML <form> outside the Server side <form> :


<%@. Page Language="C#" %>
<html>
<head>
<title>My Page</title>
</head
<body>
<form runat="server">
</form>

<form method="POST" action="http://www.microsoft.com">
<input type="submit" value="15" name="redirect" />
</form>
</body>
</html>

Take a look @. :
-Form-based Programming in ASP.NET
-Wilson WebForm enables Multiple Forms and Non-PostBack Forms

HTH
thanks for that, is it possible to do the same thing within a user control, coz this is where my problem occurs?

HTML Help

Hi,
I want to create Gradient color in my header (just like in microsoft
site) but we don;t want use the image for that and also it should work
in all browsers (If i use
filter:progid:DXImageTransform.Microsoft.Gradient, it works only in
IE). Please help me to solve this isse.

Thanks,
Jayhttp://slayeroffice.com/code/gradient/
"jaydev" <jaydev2605@.yahoo.comwrote in message news:1158958631.662572.139740@.d34g2000cwd.googlegr oups.com...

Quote:

Originally Posted by

Hi,
I want to create Gradient color in my header (just like in microsoft
site) but we don;t want use the image for that and also it should work
in all browsers (If i use
filter:progid:DXImageTransform.Microsoft.Gradient, it works only in
IE). Please help me to solve this isse.
>
Thanks,
Jay
>

HTML Help

Hi,
I want to create Gradient color in my header (just like in microsoft
site) but we don;t want use the image for that and also it should work
in all browsers (If i use
filter:progid:DXImageTransform.Microsoft.Gradient, it works only in
IE). Please help me to solve this isse.
Thanks,
Jayhttp://slayeroffice.com/code/gradient/
"jaydev" <jaydev2605@.yahoo.com> wrote in message news:1158958631.662572.139740@.d34g2000cwd.
googlegroups.com...
> Hi,
> I want to create Gradient color in my header (just like in microsoft
> site) but we don;t want use the image for that and also it should work
> in all browsers (If i use
> filter:progid:DXImageTransform.Microsoft.Gradient, it works only in
> IE). Please help me to solve this isse.
> Thanks,
> Jay
>

html header/library file

I wanted to create something like C library but for html code to be included in html or aspx html portion. How do I do that? Thanks in advance.Write the code in .inc file and include those where ever u want

Devendra Naik.
what's the exact command to include the .inc file?
I used <!--#include virtual="topnav.inc"--
but it doesn't seems to work.
Anyone??