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??

HTML Grid Layout Panel - should this control be used?

I am fairly new to ASP.NET. All the ASP.NET books I'm reading specify that web forms should be designed in Flow Layout mode rather than Grid Layout mode. I'm doing this with all my pages and for the most part everything is working fine.

There are some areas on my web pages, however, where I would like to have a little more control on control placement (rather than using a whole lot of tables to control positioning). The HTML Grid Layout Panel control seems well suited for this. My question is, are there any reasons why this control should be avoided (e.g. is it similar to using the Grid Layout mode for web pages which, apparently, should be avoided)? I don't want to run into a situation where I do a lot of work with HTML Grid Layout Panels, only to discover there are issues or browser compatibility problems.

Thanks!

Html got arranged by VS is some compacted way

I highlighed some button links and added some properties when I looked at the html view, the whole html that was neatly arrange now is compated with lines spaning several "pages" to the left . Everything works file but is quite hard to read now that i have a whole nested table and cell in a single like

I tried the edit> advance > format and nothings moves

is there any way that i can get a meaningfull formating back ?

If you select all the HTML and then press Control-K, Control-D Visual Studio will make it's best attempt to format the HTML.

html gets deleted

I'm using visual studio and working on some webforms.
the last few forms that I have created have been very
long and after I save the form - parts of the html get
deleted and I lose the objects at the bottom of the
page. the code however is still in the code behind
module. has anyone experienced this type of behavior?Bob,

Does this help?

324440 FIX: Data Loss When You Change Views in WebForm Designer

You didn't say what version of VS.NET. This is for 2002.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
jamesche@.online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

-------
>Content-Class: urn:content-classes:message
>From: "bob" <compbob_2000@.hotmail.com>
>Sender: "bob" <compbob_2000@.hotmail.com>
>Subject: html gets deleted
>Date: Mon, 27 Oct 2003 13:23:35 -0800
>Lines: 6
>Message-ID: <044701c39cd0$94ad1e90$a301280a@.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcOc0JSqjfELt55HSwGM+sLqEOvXIw==
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:186835
>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>I'm using visual studio and working on some webforms.
>the last few forms that I have created have been very
>long and after I save the form - parts of the html get
>deleted and I lose the objects at the bottom of the
>page. the code however is still in the code behind
>module. has anyone experienced this type of behavior?

HTML Generation from XML

Hi!
I have a XMl and a XSL file. And i am generating HTML file using the XXML
and XSL file using the following code
Dim xslt As New XslTransform
Dim mydata As New XmlDocument
mydata.Load("PrintId.xml")
xslt.Load("PrintID.xslt")
Dim writer As XmlTextWriter = New
XmlTextWriter("C:\Inetpub\wwwroot\VBPDFDemo\PrintID15.html", Nothing)
xslt.Transform(mydata, Nothing, writer, Nothing)
xslt = Nothing
mydata = Nothing
writer = Nothing
The code excutes fine, But it's taking a ot of time to generate the HTML.
and the process continues even if I closed my browser and generates the file
.
How do i solve the problem. how do i minimize the time?
Can anyone help me out
Thanks in advance
Baren

HTML Generation from XML

Hi!

I have a XMl and a XSL file. And i am generating HTML file using the XXML
and XSL file using the following code
Dim xslt As New XslTransform
Dim mydata As New XmlDocument
mydata.Load("PrintId.xml")
xslt.Load("PrintID.xslt")
Dim writer As XmlTextWriter = New
XmlTextWriter("C:\Inetpub\wwwroot\VBPDFDemo\PrintID15.html", Nothing)
xslt.Transform(mydata, Nothing, writer, Nothing)
xslt = Nothing
mydata = Nothing
writer = Nothing

The code excutes fine, But it's taking a ot of time to generate the HTML.
and the process continues even if I closed my browser and generates the file.
How do i solve the problem. how do i minimize the time?

Can anyone help me out

Thanks in advance

Baren

HTML Generation from XML

Hi!

I have a XMl and a XSL file. And i am generating HTML file using the XXML
and XSL file using the following code
Dim xslt As New XslTransform
Dim mydata As New XmlDocument
mydata.Load("PrintId.xml")
xslt.Load("PrintID.xslt")
Dim writer As XmlTextWriter = New
XmlTextWriter("C:\Inetpub\wwwroot\VBPDFDemo\PrintID15.html", Nothing)
xslt.Transform(mydata, Nothing, writer, Nothing)
xslt = Nothing
mydata = Nothing
writer = Nothing

The code excutes fine, But it's taking a ot of time to generate the HTML.
and the process continues even if I closed my browser and generates the file.

Can anyone help me out

Thanks in advance

Baren

HTML from Codebehind file

I'm trying to retrieve values for my HTML from the Codebehind file and I'm
unclear how to accomplish this. For example:
<INPUT TYPE="hidden" NAME="amount" VALUE="xx">
How do I populate the value field with the value of a variable from my
codebehind file?Add Runat=server and Id="<control id>" attibutes to your HTML or ASP.NET
server control tag. And from the code behhind, access it using <control
id>.Value (or any attribute/property). Eg:
On .aspx page: <input type=hidden id="hidX" value="xx" RunAt=server>
From code-behind:
hidX.Value = "My Value"
(After adding server control to the .aspx page from 'HTML View', you may
have to switch to Designer view come back so that the designer generates
appropriate control declarations in the code-behind file; of course, you can
declare controls manually also in the code-behind.)
HTH.
"tma" <tma@.allisconfusing.net> wrote in message
news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
I'm trying to retrieve values for my HTML from the Codebehind file and I'm
unclear how to accomplish this. For example:
<INPUT TYPE="hidden" NAME="amount" VALUE="xx">
How do I populate the value field with the value of a variable from my
codebehind file?
Perhaps I should provide more code. When I implemented your suggestions the
values were not posted back. Here's a larger snippet.
<form action="https://www.somesite.com/webscr" method="post">
<input type="hidden" name="amount" runat=server id="totalamount">
The codebehind totalamount.value = 80 does not appear to be working.
"Shiva" <shiva_sm@.online.excite.com> wrote in message
news:OMMy5GWeEHA.2784@.TK2MSFTNGP10.phx.gbl...
> Add Runat=server and Id="<control id>" attibutes to your HTML or ASP.NET
> server control tag. And from the code behhind, access it using <control
> id>.Value (or any attribute/property). Eg:
> On .aspx page: <input type=hidden id="hidX" value="xx" RunAt=server>
> From code-behind:
> hidX.Value = "My Value"
> (After adding server control to the .aspx page from 'HTML View', you may
> have to switch to Designer view come back so that the designer generates
> appropriate control declarations in the code-behind file; of course, you
can
> declare controls manually also in the code-behind.)
> HTH.
> "tma" <tma@.allisconfusing.net> wrote in message
> news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
> I'm trying to retrieve values for my HTML from the Codebehind file and I'm
> unclear how to accomplish this. For example:
> <INPUT TYPE="hidden" NAME="amount" VALUE="xx">
> How do I populate the value field with the value of a variable from my
> codebehind file?
>
>
In your example, the only way to do it would be to get the value of the
hidden form field from the request object:
dim val as string = Request(amount)
For other, non-form data, you will need to use Server Controls (a.k.a. Web
Form Controls) or you can transform a regular HTML element into an HTML
Server Control by adding: runat="server" into its markup.
"tma" <tma@.allisconfusing.net> wrote in message
news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
> I'm trying to retrieve values for my HTML from the Codebehind file and I'm
> unclear how to accomplish this. For example:
> <INPUT TYPE="hidden" NAME="amount" VALUE="xx">
> How do I populate the value field with the value of a variable from my
> codebehind file?
>
You should add RunAt=server for the <form> tag as well. Forgot to mention
about this, sorry about that.
Make sure your code-begind has this declaration (at page level):
protected System.Web.UI.HtmlControls.HtmlInputHidden totalamount;
"tma" <tma@.allisconfusing.net> wrote in message
news:#KalCrWeEHA.3428@.TK2MSFTNGP11.phx.gbl...
Perhaps I should provide more code. When I implemented your suggestions the
values were not posted back. Here's a larger snippet.
<form action="https://www.somesite.com/webscr" method="post">
<input type="hidden" name="amount" runat=server id="totalamount">
The codebehind totalamount.value = 80 does not appear to be working.
"Shiva" <shiva_sm@.online.excite.com> wrote in message
news:OMMy5GWeEHA.2784@.TK2MSFTNGP10.phx.gbl...
> Add Runat=server and Id="<control id>" attibutes to your HTML or ASP.NET
> server control tag. And from the code behhind, access it using <control
> id>.Value (or any attribute/property). Eg:
> On .aspx page: <input type=hidden id="hidX" value="xx" RunAt=server>
> From code-behind:
> hidX.Value = "My Value"
> (After adding server control to the .aspx page from 'HTML View', you may
> have to switch to Designer view come back so that the designer generates
> appropriate control declarations in the code-behind file; of course, you
can
> declare controls manually also in the code-behind.)
> HTH.
> "tma" <tma@.allisconfusing.net> wrote in message
> news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
> I'm trying to retrieve values for my HTML from the Codebehind file and I'm
> unclear how to accomplish this. For example:
> <INPUT TYPE="hidden" NAME="amount" VALUE="xx">
> How do I populate the value field with the value of a variable from my
> codebehind file?
>
>

HTML from Codebehind file

I'm trying to retrieve values for my HTML from the Codebehind file and I'm
unclear how to accomplish this. For example:

<INPUT TYPE="hidden" NAME="amount" VALUE="xx"
How do I populate the value field with the value of a variable from my
codebehind file?Add Runat=server and Id="<control id>" attibutes to your HTML or ASP.NET
server control tag. And from the code behhind, access it using <control
id>.Value (or any attribute/property). Eg:

On .aspx page: <input type=hidden id="hidX" value="xx" RunAt=server
From code-behind:
hidX.Value = "My Value"

(After adding server control to the .aspx page from 'HTML View', you may
have to switch to Designer view come back so that the designer generates
appropriate control declarations in the code-behind file; of course, you can
declare controls manually also in the code-behind.)

HTH.

"tma" <tma@.allisconfusing.net> wrote in message
news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
I'm trying to retrieve values for my HTML from the Codebehind file and I'm
unclear how to accomplish this. For example:

<INPUT TYPE="hidden" NAME="amount" VALUE="xx"
How do I populate the value field with the value of a variable from my
codebehind file?
Perhaps I should provide more code. When I implemented your suggestions the
values were not posted back. Here's a larger snippet.

<form action="https://www.somesite.com/webscr" method="post">
<input type="hidden" name="amount" runat=server id="totalamount"
The codebehind totalamount.value = 80 does not appear to be working.

"Shiva" <shiva_sm@.online.excite.com> wrote in message
news:OMMy5GWeEHA.2784@.TK2MSFTNGP10.phx.gbl...
> Add Runat=server and Id="<control id>" attibutes to your HTML or ASP.NET
> server control tag. And from the code behhind, access it using <control
> id>.Value (or any attribute/property). Eg:
> On .aspx page: <input type=hidden id="hidX" value="xx" RunAt=server>
> From code-behind:
> hidX.Value = "My Value"
> (After adding server control to the .aspx page from 'HTML View', you may
> have to switch to Designer view come back so that the designer generates
> appropriate control declarations in the code-behind file; of course, you
can
> declare controls manually also in the code-behind.)
> HTH.
> "tma" <tma@.allisconfusing.net> wrote in message
> news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
> I'm trying to retrieve values for my HTML from the Codebehind file and I'm
> unclear how to accomplish this. For example:
> <INPUT TYPE="hidden" NAME="amount" VALUE="xx">
> How do I populate the value field with the value of a variable from my
> codebehind file?
In your example, the only way to do it would be to get the value of the
hidden form field from the request object:

dim val as string = Request(amount)

For other, non-form data, you will need to use Server Controls (a.k.a. Web
Form Controls) or you can transform a regular HTML element into an HTML
Server Control by adding: runat="server" into its markup.

"tma" <tma@.allisconfusing.net> wrote in message
news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
> I'm trying to retrieve values for my HTML from the Codebehind file and I'm
> unclear how to accomplish this. For example:
> <INPUT TYPE="hidden" NAME="amount" VALUE="xx">
> How do I populate the value field with the value of a variable from my
> codebehind file?
You should add RunAt=server for the <form> tag as well. Forgot to mention
about this, sorry about that.

Make sure your code-begind has this declaration (at page level):
protected System.Web.UI.HtmlControls.HtmlInputHidden totalamount;

"tma" <tma@.allisconfusing.net> wrote in message
news:#KalCrWeEHA.3428@.TK2MSFTNGP11.phx.gbl...
Perhaps I should provide more code. When I implemented your suggestions the
values were not posted back. Here's a larger snippet.

<form action="https://www.somesite.com/webscr" method="post">
<input type="hidden" name="amount" runat=server id="totalamount"
The codebehind totalamount.value = 80 does not appear to be working.

"Shiva" <shiva_sm@.online.excite.com> wrote in message
news:OMMy5GWeEHA.2784@.TK2MSFTNGP10.phx.gbl...
> Add Runat=server and Id="<control id>" attibutes to your HTML or ASP.NET
> server control tag. And from the code behhind, access it using <control
> id>.Value (or any attribute/property). Eg:
> On .aspx page: <input type=hidden id="hidX" value="xx" RunAt=server>
> From code-behind:
> hidX.Value = "My Value"
> (After adding server control to the .aspx page from 'HTML View', you may
> have to switch to Designer view come back so that the designer generates
> appropriate control declarations in the code-behind file; of course, you
can
> declare controls manually also in the code-behind.)
> HTH.
> "tma" <tma@.allisconfusing.net> wrote in message
> news:ub9py6VeEHA.1692@.tk2msftngp13.phx.gbl...
> I'm trying to retrieve values for my HTML from the Codebehind file and I'm
> unclear how to accomplish this. For example:
> <INPUT TYPE="hidden" NAME="amount" VALUE="xx">
> How do I populate the value field with the value of a variable from my
> codebehind file?

HTML from code behind

Hi,
A hopefully simple question for someone to answer. I wish to dynamically change the HTML code from VB code behind. For example I have a table setup in the HTML code and what I want to do is display formatted text within this table that has been placed dynamically by code behind, depending on a querystring. See example below

<td width="300" rowspan="13" valign="top"><p></p
(CODE TO PLACED HERE BY CODE BEHIND)
</td
Above a table is defined in HTML, but I want the below code to be placed into this table by using code behind (this will be dependent on a querystring so that different text will be displayed depending on what link was used)

<p align="right"><font face="Arial, Helvetica, sans-serif">This
is a test
</font></p>
<p align="justify"><font face="Arial, Helvetica, sans-serif">Want
this sample to be sent from the code behind. How can it be done?</font></p
Can anyone please help?
ThanksYou may use <asp:table/> control and add tablerow and tablecell at run time.
Thanks for that, I had a look in MSDN and that will work fine for creating the tables, rows and cells but what about the formatted text. I noticed that there is innerhtml, could you please explain how I could use this. Would I be able to create a static table, that is written in HTML but add "runat = server" in the table definition. Then add HTML from code behind using innerHTML. I have tried getting it to work but I keep getting syntax errors. Any thoughts would be great.

Thanks
James
The easiest way (I think) is to put a placeholder where you want your dynamic text to go:

<table>
<tr>
<td>
<asp:Placeholder id="TableCellPlaceholder" runat='server" />
</td>
</tr>
</table>

In your codebehind, you of course define this placeholder:

Protected TableCellPlaceholder As System.Web.UI.WebControls.Placeholder

Then, when you get to adding the dynamic text, you just add it as a LiteralControl:

Dim HtmlTtoInject As String
If Request.Params( "s" ) = "Google" Then
HtmlToInject = "< b>Thanks for choosing Google</b>"
Else
HtmlToInject = "< i>It's time you tried Google</i>"
End If
TableCellPlaceholder.Controls.Add( New LiteralControl( HtmlToInject ) )

This is admittedly a quick and dirty approach ... however, it's also perhaps the easiest.

Hope this helps.
Great, that works just how I wanted. Thank you :)

You did say:
"This is admittedly a quick and dirty approach ... however, it's also perhaps the easiest."

What other way may you do this? Just for future reference.

Thanks again
Well, it's more "object-oriented" to do what JimmyM said, and create TableRow objects, which contain TableCell objects, which in turn contain Label objects or Literal objects ... and then attach the TableRow objects to your Table object.

But, you can do that later when you need a more structured approach to dynamically building a table.

For the simple purpose you said, using a Placeholder is nice and easy.
Just put in an <asp:label> control and use this code:

label1.InnerHtml="Here is some HTML code <bthis is in bold</b> this is a link

Hope this helps

Colin Cameron

HTML Frameset editor?

Have anyone seen a third party visual HTML Frameset ActiveX or .NET
component?
I need to define frames (add/remove), visually change sizes etc.
Not needed to be free or anything, but I have googled for hours now finding
nada.
Regards
Fredrikall html editors support this. VS does a fine job as its such simple html.
what is your exact problem? actully its so simple I've never needed more
than notepad.
-- bruce (sqlwork.com)
"Fredrik Melin" <mel@.no-spam.dacsa-remove-this.net> wrote in message
news:%23MSIR7T3EHA.824@.TK2MSFTNGP11.phx.gbl...
| Have anyone seen a third party visual HTML Frameset ActiveX or .NET
| component?
|
| I need to define frames (add/remove), visually change sizes etc.
|
| Not needed to be free or anything, but I have googled for hours now
finding
| nada.
|
| Regards
| Fredrik
|
|
You can visual change a framesets in Visual Studio.
/Lars
"Fredrik Melin" <mel@.no-spam.dacsa-remove-this.net> skrev i meddelandet
news:%23MSIR7T3EHA.824@.TK2MSFTNGP11.phx.gbl...
> Have anyone seen a third party visual HTML Frameset ActiveX or .NET
> component?
> I need to define frames (add/remove), visually change sizes etc.
> Not needed to be free or anything, but I have googled for hours now
> finding nada.
> Regards
> Fredrik
>
Yes, but this is for within a sales system where sales managers must be able
to change frames layout.
So, its for people that dont know what HTML is... therefor a visual editor
is needed.
- Fredrik
"bruce barker" <nospam_brubar@.safeco.com> wrote in message
news:%23ETMt1U3EHA.924@.TK2MSFTNGP14.phx.gbl...
> all html editors support this. VS does a fine job as its such simple html.
> what is your exact problem? actully its so simple I've never needed more
> than notepad.
> -- bruce (sqlwork.com)
> "Fredrik Melin" <mel@.no-spam.dacsa-remove-this.net> wrote in message
> news:%23MSIR7T3EHA.824@.TK2MSFTNGP11.phx.gbl...
> | Have anyone seen a third party visual HTML Frameset ActiveX or .NET
> | component?
> |
> | I need to define frames (add/remove), visually change sizes etc.
> |
> | Not needed to be free or anything, but I have googled for hours now
> finding
> | nada.
> |
> | Regards
> | Fredrik
> |
> |
>
> Yes, but this is for within a sales system where sales managers must be
able
> to change frames layout.
I imagine what you need is to write your own app where people can set their
frame preferences, which you then store in a DB and dynamically create the
frameset code from that.
-Darrel

HTML Frames.....

Is HTML frame is an old technology? Will the modern web application are
developed using the HTML frames? Does all the browsers support them?
Thank you for your suggestion,
NishAll browsers support frames, not all support iframes. I have never liked
frames and have always considered them old technology. Frames will exist
for a long time, but people have many choices for segmenting their pages.
They can use master pages. Or SmartNavigation. Or scrollable divs.
Just like any technology, it is more important to learn when to use
something rather than assuming that it might be obsolete.
"Nish" <Nish1989@.hotmail.com> wrote in message
news:%23YD$RzmRGHA.4332@.TK2MSFTNGP10.phx.gbl...
> Is HTML frame is an old technology? Will the modern web application are
> developed using the HTML frames? Does all the browsers support them?
> Thank you for your suggestion,
> Nish
>
Hi,
Peter Rilling wrote:
> All browsers support frames
Actually, not all browsers support frames. Mobile devices often don't,
or support them partly only. If the OP's website might be displayed on
mobile devices (PDAs, mobile phones), then I would rather avoid using
frames.

>, not all support iframes. I have never liked
> frames and have always considered them old technology. Frames will exist
> for a long time, but people have many choices for segmenting their pages.
> They can use master pages. Or SmartNavigation. Or scrollable divs.
> Just like any technology, it is more important to learn when to use
> something rather than assuming that it might be obsolete.
Frames have however one advantage over master pages or div: only parts
of the loaded "page" (I mean here page as a whole, meaning the frameset
and all frames) can be refreshed separately. It *can* be an advantage
(stress on *can*) in some situation, for example if one of the frame
contains a very big HTML table (in which case one might consider a
paging solution better, but anyway...).
It's possible to achieve the same with DIVs too, for example with AJAX.
However, it's more complicated and requests a good understanding of web
services, DOM, etc... as well as of the compatibility problems between
browsers.
Frames have a few divantages: Client-side communication between
frames is awkward, especially because synchronization problems are
involved: It's relatively complex for one frame to know for sure what
another frame's current state is. It's possible, but it needs a good design.
Also, the displayed URL does not necessarily correspond to a unique
state (because it's the frameset's URL and not a URL corresponding to
each of the loaded frames). This sounds like a very philosophical
problem, but it has implications one should be aware of. Again, it's
possible to solve this (for example using query strings on the
frameset's URL), but it's awkward and complicated.
I try to avoid using frames if I can, but I agree that you cannot really
call them obsolete. There are situations where they make sense. It's
good to be aware of the problems and advantages mentioned here to be
able to make an informed decision.
HTH,
Laurent
> Is HTML frame is an old technology?
I wouldn't call it a technology really. Just part of HTML.

> Will the modern web application are
> developed using the HTML frames?
Probably, though I hope not, as frames are usually implemented by developers
rather poorly. There's usually a better way to accomplish something rather
than resorting to frames.
Of coruse, there times when frames are useful.

> Does all the browsers support them?
Not sure if text browsers can handle them, but the major visual browsers
should be OK.
-Darrel

HTML Frames.....

Is HTML frame is an old technology? Will the modern web application are
developed using the HTML frames? Does all the browsers support them?
Thank you for your suggestion,
NishAll browsers support frames, not all support iframes. I have never liked
frames and have always considered them old technology. Frames will exist
for a long time, but people have many choices for segmenting their pages.
They can use master pages. Or SmartNavigation. Or scrollable divs.

Just like any technology, it is more important to learn when to use
something rather than assuming that it might be obsolete.

"Nish" <Nish1989@.hotmail.com> wrote in message
news:%23YD$RzmRGHA.4332@.TK2MSFTNGP10.phx.gbl...
> Is HTML frame is an old technology? Will the modern web application are
> developed using the HTML frames? Does all the browsers support them?
> Thank you for your suggestion,
> Nish
Hi,

Peter Rilling wrote:
> All browsers support frames

Actually, not all browsers support frames. Mobile devices often don't,
or support them partly only. If the OP's website might be displayed on
mobile devices (PDAs, mobile phones), then I would rather avoid using
frames.

>, not all support iframes. I have never liked
> frames and have always considered them old technology. Frames will exist
> for a long time, but people have many choices for segmenting their pages.
> They can use master pages. Or SmartNavigation. Or scrollable divs.
> Just like any technology, it is more important to learn when to use
> something rather than assuming that it might be obsolete.

Frames have however one advantage over master pages or div: only parts
of the loaded "page" (I mean here page as a whole, meaning the frameset
and all frames) can be refreshed separately. It *can* be an advantage
(stress on *can*) in some situation, for example if one of the frame
contains a very big HTML table (in which case one might consider a
paging solution better, but anyway...).

It's possible to achieve the same with DIVs too, for example with AJAX.
However, it's more complicated and requests a good understanding of web
services, DOM, etc... as well as of the compatibility problems between
browsers.

Frames have a few disadvantages: Client-side communication between
frames is awkward, especially because synchronization problems are
involved: It's relatively complex for one frame to know for sure what
another frame's current state is. It's possible, but it needs a good design.

Also, the displayed URL does not necessarily correspond to a unique
state (because it's the frameset's URL and not a URL corresponding to
each of the loaded frames). This sounds like a very philosophical
problem, but it has implications one should be aware of. Again, it's
possible to solve this (for example using query strings on the
frameset's URL), but it's awkward and complicated.

I try to avoid using frames if I can, but I agree that you cannot really
call them obsolete. There are situations where they make sense. It's
good to be aware of the problems and advantages mentioned here to be
able to make an informed decision.

HTH,
Laurent
> Is HTML frame is an old technology?

I wouldn't call it a technology really. Just part of HTML.

> Will the modern web application are
> developed using the HTML frames?

Probably, though I hope not, as frames are usually implemented by developers
rather poorly. There's usually a better way to accomplish something rather
than resorting to frames.

Of coruse, there times when frames are useful.

> Does all the browsers support them?

Not sure if text browsers can handle them, but the major visual browsers
should be OK.

-Darrel

HTML Frames Problem - Urgent

Hi Guysi have a small issue with my frames on a page . Error details as followsI have two frames , on my left frame i have menu with links ,All where working fine untill few of my users started to getting this error , when ever they click the menu link , the Left menu disappears and only the right page ( page which requested from left menu) get loaded ...its still working fine in my system , we tried reinstalling the IE too .So any one has any ideas abt this ... please let me know ,

Thanks

P.Ramprathap

Hi there,

With the info you have given it is a bit hard to know what could be the problem, so some more information would be good.

Is the page just a static html page with the two frames and the links in the menu just hardcoded in there or is it an aspx page with a dynamic menu or something like that?

How long has it been working before this problem appeared?

Has it worked before for the users who now have a problem?

What browser does the users with the problem use and have they recently upgraded (to IE 7 or something like that)?

/Ola


hi

its aspx page with two frameset inside , its working fine in my system , and other collegues , this happens especially with one user , Its been hard to convince the user that its the browser issue .

In this specific case when ever the user clicks the Left frame ( which contain the menu) the browser navigates to the desired page but not within the frame instead the menu frame gets dissapear and the page loads as a seprate page ....

need to figure out the IE settings which restircts the the frame ..

the user uses IE....

does it makes thinks clear for you ...?


If possible... You may want to re-think using frames with ASP.Net. You may be able to achieve the same results through master pages...

Frames are pretty much evil any way you cut it, but you might want to check the IIS logs and see if the menu is being re-requested and not appearing or if it might be a problem with browser caching.

And yes, there are ways to have this same design effect in a dynamic page withjout frames. Master pages would be a great use here.

Jeff


Its an Enterprise application running across our global customer for past 2-3 years , changing it to masterpage will be diffcult task in getting the approvalSad

html frames and forms authentication

I have website www.aWebsite.com. The client I made it for now wants to make
a frame wrapper on their corporate site, so my website will run in a frame
like this.
<frameset rows="134,*" cols="*" framespacing="0" frameborder="NO"
border="0">
<frame src="http://pics.10026.com/?src=http://www.aWebsiteMarketing.com/top.html" name="topFrame"
frameborder="yes" scrolling="NO">
<frame src="http://pics.10026.com/?src=http://www.aWebsiteMarketing.com/bottom.html"
name="mainFrame">
</frameset>
In the bottom.html there is a link to my www.aWebsite.com.
So the URL in the title bar will read http://www.aWebsiteMarketing.com, but
in the bottom frame my website
www.aWebsite.com will be showing.
my www.aWebsite.com requires a login via formsauthentication. the method:
FormsAuthentication.SetAuthCookie(customerID, RememberLogin.checked)
is not working. I don't have this problem on my WinXpsp1, but on any other
Win2k in my office.
this is probably one of the most frustrating things I have ever had to deal
with...
help, ~psb

html frames and forms authentication

I have website www.aWebsite.com. The client I made it for now wants to make
a frame wrapper on their corporate site, so my website will run in a frame
like this.

<frameset rows="134,*" cols="*" framespacing="0" frameborder="NO"
border="0">
<frame src="http://pics.10026.com/?src=http://www.aWebsiteMarketing.com/top.html" name="topFrame"
frameborder="yes" scrolling="NO">
<frame src="http://pics.10026.com/?src=http://www.aWebsiteMarketing.com/bottom.html"
name="mainFrame">
</frameset
In the bottom.html there is a link to my www.aWebsite.com.

So the URL in the title bar will read http://www.aWebsiteMarketing.com, but
in the bottom frame my website
www.aWebsite.com will be showing.

my www.aWebsite.com requires a login via formsauthentication. the method:
FormsAuthentication.SetAuthCookie(customerID, RememberLogin.checked)
is not working. I don't have this problem on my WinXpsp1, but on any other
Win2k in my office.

this is probably one of the most frustrating things I have ever had to deal
with...
help, ~psb

html frames

Can html frames be used with asp.net?It's important to understand the distinction between server-side and client-side.

On the server, we use ASP.NET to execute C# or VB.NET code.

On the client (the user's browser), we have HTML, Javascript and CSS.

Typically, we use our server-side code to dynamically create the HTML, JS and CSS which is sent to the client.

Because a frameset is just plain-jane HTML, then ASP.NET can certainly create a frame-based website.

However, once your ASP.NET code has create the frameset and sent it to the client, ASP.NET loses touch with it. The actual functioning of a frameset occurs on the client. Passing values back and forth, having one frame change the page of another, etc, all occurs on the client with Javascript.

So, yes, you can use ASP.NET tocreate framed pages.

But, no, you cannot use ASP.NET tocontrol the framed pages.

For example, you cannot use ASP.NET so that PageA retrieves values from PageB (at least, not without a lot of effort on your part).

In my opinion, frames introduce many many more problems than they solve. So, if you can avoid them, do so.

I hope this helps.
hello SomeNewKid, can u give me an alternative to the framed page? I'm totally new to asp.net, starting to learn with vs.net using vb.net, what is a better solution to the html frameset? i want to make a page which is almost like normal html page with frameset of upper and left panel. can u help me out? thx

I do agree with SomeNewKid that frames should be avoided.

What you can do is either the following:

1- Create an ASPX page with a main table, include in the upper cell a UserControl called Header.ascx, Footer cell, a Footer.ascx, and leave the cell in the middle to place your content inside it. Then each new page you would copy that table and put your content for that specific page inside the content cell left blank.

Well, that is not the optimal solution, but being a beginner you can start with.

Other solution in ASP.NET 1.1 is to use Master Pages, have a look at:

MasterPages: Improved Version
Hope that helps a bit,
Regards


osxchd wrote:

what is a better solution to the html frameset?

Before frames became available, most web pages were created by hand. This would mean that the website developer would have to cut and paste the same "common HTML" (such as headers and navigation menus) into every single page. If a new page was added to the website, every single page would have to be updated to include that new page in the navigation HTML.
Frames became available and allowed a web developer to create *one* page for the common HTML, and place it in the top or left frame. Then, all other pages could be created independently of each other, with no common HTML shared between them. While this solved the problem of sharing HTML between pages, it introduced its own set of problems (pages could not be bookmarked, JavaScript was needed to communicate between frames, and other headaches).
So, frames really only solved one problem: how to share code between pages. This was an okay solution at the time. Now, we have technologies such as PHP, ASP, and everybody's favourite, ASP.NET. These technologies also allow us to put code into a separate file and then share it between pages (using #include statements in PHP and ASP, and using User Controls in ASP.NET). The great thing about these technologies is that the final page is a single page, and not a frameset. So, these technologies provide the same benefit as frames, but without the set of problems introduced by frames.
So, if you have ASP.NET available, how can you get the same sort of benefits as frames provide?
Thesimple answer is that you can use an HTML <table> element to split your page into a grid. You then place inside the top of the grid a Header.ascx User Control, and place in the left cell of the grid a Navigation.ascx User Control. The actual content of each individual page goes into the right cell of the grid.
To learn about User Controls, please read theUser Controls QuickStart Tutorial. Actually, that's a pretty poor introduction to User Controls. You may prefer:Building ASP.NET User and Server Controls -- Part 1.
Finally, I said above that thesimple answer is to use an HTML <table> element to split your page into a grid. While this is a very common technique, it too is largely outdated now, replaced by CSS layout. However, if you are new to HTML and to ASP.NET, you should start with the simplicity of using a <table> to control the layout of your page.

HTML Frames

Hi,

I have been told that I should avoid using html frames as much as possible
in ASP applications. Why is that so?

Thanks,
AliI could go on and on.
If you love client side javascript then you could make such a system work if
you had to.
If you have frames, none of your pages are alive at the same point in time
on the server, making it very difficult to pass information between pages.
All that has to be done client side.

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

"A.M" <IHateSpam@.sapm123.com> wrote in message
news:%23fHOCPTlDHA.2012@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have been told that I should avoid using html frames as much as possible
> in ASP applications. Why is that so?
> Thanks,
> Ali
Hi Ali,

Firstly, I want to thank Steve for his great help in this issue. Please
refer to his response carefully.

In addition, there are security issues we should consider in when we use
the frames.

About Cross-Frame Scripting and Security
http://msdn.microsoft.com/library/d...uthor/om/xframe
_scripting_security.asp
"...
With Dynamic HTML (DHTML), content in different windows and frames can
interact in powerful ways by scripting with the object model. However,
since a browser can simultaneously display unrelated documents in its
various windows and frames, certain rules must be enforced to protect data
integrity and privacy of information.

This article describes how and why these restrictions apply in the DHTML
Object Model. All rules about script interaction apply equally to windows,
dialog boxes, frameSets, frames, and iframes.
..."

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Hi Ali,

Firstly, I want to thank Steve for his great help in this issue. Please
refer to his response carefully.

In addition, there are security issues we should consider in when we use
the frames.

About Cross-Frame Scripting and Security
http://msdn.microsoft.com/library/d...uthor/om/xframe
_scripting_security.asp
"...
With Dynamic HTML (DHTML), content in different windows and frames can
interact in powerful ways by scripting with the object model. However,
since a browser can simultaneously display unrelated documents in its
various windows and frames, certain rules must be enforced to protect data
integrity and privacy of information.

This article describes how and why these restrictions apply in the DHTML
Object Model. All rules about script interaction apply equally to windows,
dialog boxes, frameSets, frames, and iframes.
..."

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

HTML Frames

Hi,

I have been told that I should avoid using html frames as much as possible
in ASP applications. Why is that so?

Thanks,
AliI could go on and on.
If you love client side javascript then you could make such a system work if
you had to.
If you have frames, none of your pages are alive at the same point in time
on the server, making it very difficult to pass information between pages.
All that has to be done client side.

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

"A.M" <IHateSpam@.sapm123.com> wrote in message
news:%23fHOCPTlDHA.2012@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have been told that I should avoid using html frames as much as possible
> in ASP applications. Why is that so?
> Thanks,
> Ali

html forms within the server generated form tag

Ok, I'm using an XSL to generate the content div of a page. I'm using
http://script.aculo.us to do some asynch posting and getting so that I don't
actually have to have the server know what I've generated. The whole idea is
that the content is organic. That part is working. Except for one strange
thing... I'm not sure if this is an ASP.net thing, or something I just don't
know about the DOM. When I add sub-forms with just plain html form tags,
the first child form I add isn't recognized as a separate form. It's
contents are 'added' to the main form. I've worked around it by putting a
dummy do nothing form on the page in front of my other generated sub forms...
but what gives here? I know it's not my markup because if I reverse the
order of the generated forms, the FIRST sub-form on the page is always
'assimilated' in the aspNetform, I've tried everything to get this not to
happen, enclosing in divs, and even just making a page with nothing but
generated forms... same results every time. The first html form on the page
is ALWAYS added to the asp.net generated form, no matter what. Am I missing
something? (I find that every time I post here, I usually am)

html forms within the server generated form tag

Ok, I'm using an XSL to generate the content div of a page. I'm using
http://script.aculo.us to do some asynch posting and getting so that I don't
actually have to have the server know what I've generated. The whole idea i
s
that the content is organic. That part is working. Except for one strange
thing... I'm not sure if this is an ASP.net thing, or something I just don't
know about the DOM. When I add sub-forms with just plain html form tags,
the first child form I add isn't recognized as a separate form. It's
contents are 'added' to the main form. I've worked around it by putting a
dummy do nothing form on the page in front of my other generated sub forms..
.
but what gives here? I know it's not my markup because if I reverse the
order of the generated forms, the FIRST sub-form on the page is always
'assimilated' in the aspNetform, I've tried everything to get this not to
happen, enclosing in divs, and even just making a page with nothing but
generated forms... same results every time. The first html form on the page
is ALWAYS added to the asp.net generated form, no matter what. Am I missing
something? (I find that every time I post here, I usually am)

HTML Forms not working in precompiled version

Hi everybody,
on a aspx page, i have a HTML form that on submit calls the aspx page
itself.
works fine in asp, in .NET 1.1, non precompiled .Net 2.0.
In the precompiled version of the .NET 2.0, the request.form in the
request after submitting the form is empty(request.form.count=0).again,
the code runs smoothly if the page is not precompiled
any ideas apprecicated
thanks in advance
Markus

html forms in aspx pages

I can't seem to get my html form to submit properly from within a web form.
Here's my form tag syntax and some delivery hidden fields.
<form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
method="POST" onsubmit="return verify();">
<input type="hidden" name="recipient" value=me@dotnet.itags.org.mymail.net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.htm" />
...............
...............
rest of form.
I have the form within <asp:content> tags of an asp web form page. Is that
the problem? Do html forms need to be in a file with an html extension and
not a web form. This web form uses a masterpage. I did try putting the html
forms in the masterpage -- but that didn't seem to affect anything.
The form recognizes the reset button and clears the form, but when I submit
it simply reloads the page -- and doesn't access the delivery.cgi file nor
send me the results nor redirect to the confirmation page.
Thanks for any help.When you say you can't get it to submit properly - what exactly do you mean
(what happens)?
I've never tried the 'old' way of doing forms in a content page, so I'm not
exactly sure what to expect - but I'd suggest writing it the ASP.Net way,
instead - I do that all the time and it works fine...
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"thersitz" <thersitz@.gmail.com> wrote in message
news:eiFXdmnOHHA.2232@.TK2MSFTNGP02.phx.gbl...
> I can't seem to get my html form to submit properly from within a web
form.
> Here's my form tag syntax and some delivery hidden fields.
> <form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
> method="POST" onsubmit="return verify();">
> <input type="hidden" name="recipient" value=me@.mymail.net />
> <input type="hidden" name="redirect"
> value="http://www.xxx.org/forms/confirmation.htm" />
> ...............
> ...............
> rest of form.
> I have the form within <asp:content> tags of an asp web form page. Is that
> the problem? Do html forms need to be in a file with an html extension and
> not a web form. This web form uses a masterpage. I did try putting the
html
> forms in the masterpage -- but that didn't seem to affect anything.
> The form recognizes the reset button and clears the form, but when I
submit
> it simply reloads the page -- and doesn't access the delivery.cgi file nor
> send me the results nor redirect to the confirmation page.
> Thanks for any help.
>
>
>
>
>
You can't nest HTML forms inside each other.
HTH,
Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com
In case of Minimalism, break Philip Glass.
"thersitz" <thersitz@.gmail.com> wrote in message
news:eiFXdmnOHHA.2232@.TK2MSFTNGP02.phx.gbl...
>I can't seem to get my html form to submit properly from within a web form.
>Here's my form tag syntax and some delivery hidden fields.
> <form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
> method="POST" onsubmit="return verify();">
> <input type="hidden" name="recipient" value=me@.mymail.net />
> <input type="hidden" name="redirect"
> value="http://www.xxx.org/forms/confirmation.htm" />
> ...............
> ...............
> rest of form.
> I have the form within <asp:content> tags of an asp web form page. Is that
> the problem? Do html forms need to be in a file with an html extension and
> not a web form. This web form uses a masterpage. I did try putting the
> html forms in the masterpage -- but that didn't seem to affect anything.
> The form recognizes the reset button and clears the form, but when I
> submit it simply reloads the page -- and doesn't access the delivery.cgi
> file nor send me the results nor redirect to the confirmation page.
> Thanks for any help.
>
>
>
>
>
Thanks David. I am really new to asp.net, and feel I am drowning.
Well, my action attribute is suppose to go to this
<action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"> cgi file and get
read and then delivered and then send the user to a confirmation page. All
that happens in my aspx file is that the page reloads and nothing seems to
get sent anywhere.
I tried using the asp.net controls to build the form -- and still use the
delivery.cgi to parse it -- but then I was getting post back errors.
If I build the form using all asp.net controls -- and not use any regular
html form tags -- how do I get it to deliver say an email to a set of
recipients?
I appropriately have an asp for dummies book and it seems to suggest just
using html form tags -- and when doing so, the page builds fine and displays
fine. The reset button clears the form. But submitting just reloads the very
same page instead of routing to the cgi file handler.
"David Wier" <david_wier@.noSpamhotmail.com> wrote in message
news:uzZ0r%23nOHHA.3212@.TK2MSFTNGP02.phx.gbl...
> When you say you can't get it to submit properly - what exactly do you
> mean
> (what happens)?
> I've never tried the 'old' way of doing forms in a content page, so I'm
> not
> exactly sure what to expect - but I'd suggest writing it the ASP.Net way,
> instead - I do that all the time and it works fine...
> --
> David Wier
> MVP/ASPInsider
> http://aspnet101.com
> http://aspexpress.com
>
> "thersitz" <thersitz@.gmail.com> wrote in message
> news:eiFXdmnOHHA.2232@.TK2MSFTNGP02.phx.gbl...
> form.
> html
> submit
>
The problem here, is the form deal, as Kevin pointed out - - - (doah! -
wasn't thinking clearly enough)
The way this is normally done is creating the form itself (without the form
tags), and then adding a button. Then, inside the button's click event, you
create everything that you need done with the form.
Not totally sure, again, with the cgi aspect of this - but check out this
sample on crosspage posting and see if you can get it started that way:
age" target="_blank">http://quickstarts.asp.net/QuickSta...ossp
age
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"thersitz" <thersitz@.gmail.com> wrote in message
news:uVpBYQoOHHA.4604@.TK2MSFTNGP06.phx.gbl...
> Thanks David. I am really new to asp.net, and feel I am drowning.
> Well, my action attribute is suppose to go to this
> <action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"> cgi file and get
> read and then delivered and then send the user to a confirmation page. All
> that happens in my aspx file is that the page reloads and nothing seems to
> get sent anywhere.
> I tried using the asp.net controls to build the form -- and still use the
> delivery.cgi to parse it -- but then I was getting post back errors.
> If I build the form using all asp.net controls -- and not use any regular
> html form tags -- how do I get it to deliver say an email to a set of
> recipients?
> I appropriately have an asp for dummies book and it seems to suggest just
> using html form tags -- and when doing so, the page builds fine and
displays
> fine. The reset button clears the form. But submitting just reloads the
very
> same page instead of routing to the cgi file handler.
>
> "David Wier" <david_wier@.noSpamhotmail.com> wrote in message
> news:uzZ0r%23nOHHA.3212@.TK2MSFTNGP02.phx.gbl...
way,
action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
>
Yes it does. Thanks, Kevin.
Could I do this in my masterpage:
<form id="form1" runat="server"
action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi">
And then build a web form linking that masterpage and when submitting have
the server send the results to the cgi file cited so that the cgi file
parses and delivers -- like my other html forms?
"Kevin Spencer" <unclechutney@.nothinks.com> wrote in message
news:OyRe8NoOHHA.4172@.TK2MSFTNGP04.phx.gbl...
> You can't nest HTML forms inside each other.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> Bit Player
> http://unclechutney.blogspot.com
> In case of Minimalism, break Philip Glass.
> "thersitz" <thersitz@.gmail.com> wrote in message
> news:eiFXdmnOHHA.2232@.TK2MSFTNGP02.phx.gbl...
>
Another method is to put the "regular" HTML form outside the WebForm
(outside of the <form...>...</form> tags) in the ASP.Net page. Of course,
you would have to change your method of adding the "plain HTML" form code, a
server-side include, for example.
HTH,
Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com
In case of Minimalism, break Philip Glass.
"David Wier" <david_wier@.noSpamhotmail.com> wrote in message
news:e7u7ZeoOHHA.400@.TK2MSFTNGP04.phx.gbl...
> The problem here, is the form deal, as Kevin pointed out - - - (doah! -
> wasn't thinking clearly enough)
> The way this is normally done is creating the form itself (without the
> form
> tags), and then adding a button. Then, inside the button's click event,
> you
> create everything that you need done with the form.
> Not totally sure, again, with the cgi aspect of this - but check out this
> sample on crosspage posting and see if you can get it started that way:
> spage" target="_blank">http://quickstarts.asp.net/QuickSta...os
spage
>
> --
> David Wier
> MVP/ASPInsider
> http://aspnet101.com
> http://aspexpress.com
>
> "thersitz" <thersitz@.gmail.com> wrote in message
> news:uVpBYQoOHHA.4604@.TK2MSFTNGP06.phx.gbl...
> displays
> very
> way,
> action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
>
I just gave you a suggestion in another post in this same thread. See if you
like it. The important thing to remember is that a WebForm is, on the client
side, an HTML form, and you can't nest HTML forms inside one another. How
you work around that is up to you, but I did make a suggestion.
HTH,
Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com
In case of Minimalism, break Philip Glass.
"thersitz" <thersitz@.gmail.com> wrote in message
news:uCL49goOHHA.4172@.TK2MSFTNGP04.phx.gbl...
> Yes it does. Thanks, Kevin.
> Could I do this in my masterpage:
> <form id="form1" runat="server"
> action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi">
> And then build a web form linking that masterpage and when submitting have
> the server send the results to the cgi file cited so that the cgi file
> parses and delivers -- like my other html forms?
>
> "Kevin Spencer" <unclechutney@.nothinks.com> wrote in message
> news:OyRe8NoOHHA.4172@.TK2MSFTNGP04.phx.gbl...
>