Thursday, March 29, 2012
HTML IMG SRC
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
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 forms in aspx pages
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...
>
Monday, March 26, 2012
HTML Extension for ASP.NET 2.0
encountering a strange error. I'm looking for help configuring my
".html" pages to execute as ".aspx" pages.
I have added the IIS file extension mapping, I have also added the
following to the Web.Config file:
<compilation>
<buildProviders>
<add extension=".html"
type="System.Web.Compilation.PageBuildProvider"
appliesTo="Web" />
</buildProviders>
</compilation>
<httpHandlers>
<add path="*.html"
verb="*"
type="System.Web.UI.PageHandlerFactory"
validate="True" />
</httpHandlers
In my .html pages I receive a context error (example: "'Context' is not
a member of 'Default4'"), yet my page is wired up just like any other
normal aspx page, which do not receive any error.
Example file names: Default4.html, Default4.html.vb
Please help!
Thanks.I just setup an application just as you've described and it works just fine
for me. I'm using Beta2. Perhaps there's something else going on?
-Brock
DevelopMentor
http://staff.develop.com/ballen
> I am trying to map ASP.NET execution to the ".html" extension. And I
> am encountering a strange error. I'm looking for help configuring my
> ".html" pages to execute as ".aspx" pages.
> I have added the IIS file extension mapping, I have also added the
> following to the Web.Config file:
> <compilation>
> <buildProviders>
> <add extension=".html"
> type="System.Web.Compilation.PageBuildProvider"
> appliesTo="Web" />
> </buildProviders>
> </compilation>
> <httpHandlers>
> <add path="*.html"
> verb="*"
> type="System.Web.UI.PageHandlerFactory"
> validate="True" />
> </httpHandlers>
> In my .html pages I receive a context error (example: "'Context' is
> not a member of 'Default4'"), yet my page is wired up just like any
> other normal aspx page, which do not receive any error.
> Example file names: Default4.html, Default4.html.vb
> Please help!
> Thanks.
Interesting. I am also using Beta2. How are you running your pages? Do
they have to be precompiled, or can I run them uncompiled as usual?
I ran w/o precompile using Cassini (the built-in development webserver).
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Interesting. I am also using Beta2. How are you running your pages? Do
> they have to be precompiled, or can I run them uncompiled as usual?
It looks like the "appliesTo" and "validate"
properties have been deprecated.
Try :
<compilation>
<buildProviders>
<add extension=".html"
type="System.Web.Compilation.PageBuildProvider"
/>
</buildProviders>
</compilation>
<httpHandlers>
<add path="*.html"
verb="*"
type="System.Web.UI.PageHandlerFactory"
/>
</httpHandlers
And , of course, add the file type in the "configuration" option
for the application in the Internet Service Manager.
That's the way I set up my custom extension ".juan"
Check it out :
http://asp.net.do/test/version.juan
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================
"guppywon" <guppywon@.chriswelch.com> wrote in message
news:1121797270.911809.132060@.g14g2000cwa.googlegr oups.com...
>I am trying to map ASP.NET execution to the ".html" extension. And I am
> encountering a strange error. I'm looking for help configuring my
> ".html" pages to execute as ".aspx" pages.
> I have added the IIS file extension mapping, I have also added the
> following to the Web.Config file:
> <compilation>
> <buildProviders>
> <add extension=".html"
> type="System.Web.Compilation.PageBuildProvider"
> appliesTo="Web" />
> </buildProviders>
> </compilation>
> <httpHandlers>
> <add path="*.html"
> verb="*"
> type="System.Web.UI.PageHandlerFactory"
> validate="True" />
> </httpHandlers>
> In my .html pages I receive a context error (example: "'Context' is not
> a member of 'Default4'"), yet my page is wired up just like any other
> normal aspx page, which do not receive any error.
> Example file names: Default4.html, Default4.html.vb
> Please help!
> Thanks.
The context error I am receiving is in Visual Studio 2005, and I am
trying to run the site using IIS. Do I need to do anything within
Visual Studio to support .html, or are my pages going to be
second-class citizens as with VS2003?
I don't understand your problem.
If your problem is that you want to create Html pages, go to the
File menu, then New, File, and select the HTML Page template.
Simply adding the "L" to the default .HTM filename lets you
build HTML pages and you'll have standard HTML objects
at your disposal which you can include in your HTML page.
Any HTML object which you insert will have a set of properties
which you can define in the Visual Studio Property box.
If you want to write JavaScript, you can do that, too,
although there's no additional help for that.
So, support for HTML files *is* there.
If your problem is that you want HTML files processed by
the ASP.NET engine, you *can* do that as I showed you.
I don't know of any way for Visual Studio to recognize custom
file extensions so that Intellisense, etc., work when a custom
extension is loaded ( Is that what you consider the problem to be ?).
You might workaround that by writing your code in an aspx file,
and renaming the file to the html extension when it's working.
If you setup the html extension per the instructions I sent you,
the pages *will* run, since your clients won't be using VS.NET
to run your pages, but their browsers.
Bottom line: VS.NET is behaving as it should, as I see it.
If you differ, please explain what you
would like VS.NET to do with HTML files.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================
"guppywon" <guppywon@.chriswelch.com> wrote in message
news:1121864039.504071.306260@.f14g2000cwb.googlegr oups.com...
> The context error I am receiving is in Visual Studio 2005, and I am
> trying to run the site using IIS. Do I need to do anything within
> Visual Studio to support .html, or are my pages going to be
> second-class citizens as with VS2003?
I don't have the rest of this thread, but I seem to recall that you said
you made the mappings in IIS for .html files to the ASP.NET ISAPI (make sure
it's the 2.0 version).
Just to see if everything's ok, I'd suggest starting from scratch. Make a
FileSystem project (that was you don't have IIS to worry about) and make
a simple .aspx and then switch it all over to .html and see if that works.
I'm thinking that you'll have to take these little steps to isolate the problem.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> The context error I am receiving is in Visual Studio 2005, and I am
> trying to run the site using IIS. Do I need to do anything within
> Visual Studio to support .html, or are my pages going to be
> second-class citizens as with VS2003?
I was finally able to get it to work. I accidently misconfigured IIS,
and simply had to fix the mistake.
HTML Encoding in ASP .NET 2.0 Best Practices
There currently is no HTML Encoding done anywhere. Data to the
application come from all different places such as UI, WebServices,
Remoting and listeners that log data. All this data needs to be shown
to the user at some point and all of it can include some sort of HTML.
How in the world can I make sure that this informations is displayed
properly without allowing the HTML in the Data to mess up the HTML in
the page. Of course i have to HTML Encode the information but how do i
do that?
I have tons of pages! Do i really have to go to every possible page,
looking for every possible piece of output information and
Server.HtmlEncode it? That has to be the most painful thought i could
possibly think of :)
Maybe there is a desing principle i'm missing. Maybe if i had coded my
pages in a certain technique, all the information would have to through
certain controls, or through a certain mechanism that makes sure what
needs to be encoded is encoded and what needs to be left unencoded
remains unencoded.
Any help?
Thanks,
Markwell best practice would have been to think about this at the design of the
site.
1) which data fields are html that should be displayed as html and are
certified safe.
2) which data fields have html which should be scrubbed, remove scripting,
check for dangling tokens (say a <b> with no </b> ), imbedded forms, etc.
3)which data is just raw data and should be displayed as the characts type
(input <hi>, should be displayed as <hi> ).
all data should handling should default to #3. this means no response write
without encoding, no InnerHtml without validation. most controls will do the
correct behavior if you use the Text value.
-- bruce (sqlwork.com)
"Untitled" <markoueis@.hotmail.com> wrote in message
news:1140814406.809568.287320@.j33g2000cwa.googlegroups.com...
>I currently have a web application with hundreds of pages and controls.
> There currently is no HTML Encoding done anywhere. Data to the
> application come from all different places such as UI, WebServices,
> Remoting and listeners that log data. All this data needs to be shown
> to the user at some point and all of it can include some sort of HTML.
> How in the world can I make sure that this informations is displayed
> properly without allowing the HTML in the Data to mess up the HTML in
> the page. Of course i have to HTML Encode the information but how do i
> do that?
> I have tons of pages! Do i really have to go to every possible page,
> looking for every possible piece of output information and
> Server.HtmlEncode it? That has to be the most painful thought i could
> possibly think of :)
> Maybe there is a desing principle i'm missing. Maybe if i had coded my
> pages in a certain technique, all the information would have to through
> certain controls, or through a certain mechanism that makes sure what
> needs to be encoded is encoded and what needs to be left unencoded
> remains unencoded.
> Any help?
> Thanks,
> Mark
>
HTML Encoding in ASP .NET 2.0 Best Practices
There currently is no HTML Encoding done anywhere. Data to the
application come from all different places such as UI, WebServices,
Remoting and listeners that log data. All this data needs to be shown
to the user at some point and all of it can include some sort of HTML.
How in the world can I make sure that this informations is displayed
properly without allowing the HTML in the Data to mess up the HTML in
the page. Of course i have to HTML Encode the information but how do i
do that?
I have tons of pages! Do i really have to go to every possible page,
looking for every possible piece of output information and
Server.HtmlEncode it? That has to be the most painful thought i could
possibly think of :)
Maybe there is a desing principle i'm missing. Maybe if i had coded my
pages in a certain technique, all the information would have to through
certain controls, or through a certain mechanism that makes sure what
needs to be encoded is encoded and what needs to be left unencoded
remains unencoded.
Any help?
Thanks,
Markwell best practice would have been to think about this at the design of the
site.
1) which data fields are html that should be displayed as html and are
certified safe.
2) which data fields have html which should be scrubbed, remove scripting,
check for dangling tokens (say a <b> with no </b>), imbedded forms, etc.
3)which data is just raw data and should be displayed as the characts type
(input <hi>, should be displayed as <hi>).
all data should handling should default to #3. this means no response write
without encoding, no InnerHtml without validation. most controls will do the
correct behavior if you use the Text value.
-- bruce (sqlwork.com)
"Untitled" <markoueis@.hotmail.com> wrote in message
news:1140814406.809568.287320@.j33g2000cwa.googlegr oups.com...
>I currently have a web application with hundreds of pages and controls.
> There currently is no HTML Encoding done anywhere. Data to the
> application come from all different places such as UI, WebServices,
> Remoting and listeners that log data. All this data needs to be shown
> to the user at some point and all of it can include some sort of HTML.
> How in the world can I make sure that this informations is displayed
> properly without allowing the HTML in the Data to mess up the HTML in
> the page. Of course i have to HTML Encode the information but how do i
> do that?
> I have tons of pages! Do i really have to go to every possible page,
> looking for every possible piece of output information and
> Server.HtmlEncode it? That has to be the most painful thought i could
> possibly think of :)
> Maybe there is a desing principle i'm missing. Maybe if i had coded my
> pages in a certain technique, all the information would have to through
> certain controls, or through a certain mechanism that makes sure what
> needs to be encoded is encoded and what needs to be left unencoded
> remains unencoded.
> Any help?
> Thanks,
> Mark
Saturday, March 24, 2012
HTML Elements and Web Control Elements ...
my email page code looks like this:-
===========================
you can set an html textbox value the same way you did in ASP.Sub Page_load(Sender as Object, E as EventArgs)
textbox1.text = cstr(session("emailAddress")) 'this works fine
request.form("EmailAddress") = cstr(session("emailAddress")) 'not working :(
If request.form("EmailAddress") = "" Then
dim strResponse as string = "<h2>Send Email using ASP.NET formatted in HTML</h2>"
lblMessage.Text = strResponse
Else
dim strResponse as string = "You just sent an email message formatted in HTML to:<h2>" & request("EmailAddress") & "</h2>"
lblMessage.Text = strResponse
End IfEnd Sub
Sub btn_Click(sender as Object, e as System.EventArgs)
If request.form("EmailAddress") <> ""
Dim mail As New MailMessage
mail.From = "email@dotnet.itags.org.yahoo.com"
mail.To = request.form("EmailAddress")
mail.Subject = "Message sent using ASP.NET and CDONTS"
mail.Body = "HTML Message sent from ASPFree.com using ASP.NET and Cdonts" & "<a href=http://aspfree.com/aspnet/email.aspx>Wonder how this is done?</a>" & "<a href=http://aspfree.com/aspnet/setupcdonts.aspx>Wonder How to setup CDONTS?</a>"
mail.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "19.204.22.166"
SmtpMail.Send(mail)
End If
End Sub
<input type="textbox" value="<%=Session("emailaddress")%"
the server controls give you a great deal of flexibility when building a web page. The code behind makes programming a web page more like programming a windows form. each server control does have overhead however, so if you dont need the extra functionality provided by making the control a runat=server, then you should stick to regular HTML elements.
html editor for update pages contents
I develop a Web site ASP.NET which contains dynamic pages (example: News .).
I would want that the administrator of site can add and update contents in
these pages with formatting options (example: colors, fonts.); I believe
that the solution is a small html editor.
Somebody could help me or show me how to make?
Quite other idea will be welcome.
Thank you in advance.
NoroHi Noro,
You might want to check out the free editor that comes with DotNetNuke:
http://www.dotnetnuke.com/
Ken
Microsoft MVP [ASP.NET]
"Noro" <noureddine@.astoine.com> wrote in message
news:%23eWu7VWhGHA.3572@.TK2MSFTNGP04.phx.gbl...
> Hello,
> I develop a Web site ASP.NET which contains dynamic pages (example: News
> .). I would want that the administrator of site can add and update
> contents in these pages with formatting options (example: colors, fonts.);
> I believe that the solution is a small html editor.
> Somebody could help me or show me how to make?
> Quite other idea will be welcome.
>
> Thank you in advance.
> Noro
>
html editor for update pages contents
I develop a Web site ASP.NET which contains dynamic pages (example: News .).
I would want that the administrator of site can add and update contents in
these pages with formatting options (example: colors, fonts.); I believe
that the solution is a small html editor.
Somebody could help me or show me how to make?
Quite other idea will be welcome.
Thank you in advance.
NoroJust a remark: My idea is to integrate the html editor into the
administration interface of the site.
Thank you in advance,
Noro
"Noro" <noureddine@.astoine.com> a crit dans le message de news:
%23eWu7VWhGHA.3572@.TK2MSFTNGP04.phx.gbl...
> Hello,
> I develop a Web site ASP.NET which contains dynamic pages (example: News
> .). I would want that the administrator of site can add and update
> contents in these pages with formatting options (example: colors, fonts.);
> I believe that the solution is a small html editor.
> Somebody could help me or show me how to make?
> Quite other idea will be welcome.
>
> Thank you in advance.
> Noro
Hi Noro,
You might want to check out the free editor that comes with DotNetNuke:
http://www.dotnetnuke.com/
Ken
Microsoft MVP [ASP.NET]
"Noro" <noureddine@.astoine.com> wrote in message
news:%23eWu7VWhGHA.3572@.TK2MSFTNGP04.phx.gbl...
> Hello,
> I develop a Web site ASP.NET which contains dynamic pages (example: News
> .). I would want that the administrator of site can add and update
> contents in these pages with formatting options (example: colors, fonts.);
> I believe that the solution is a small html editor.
> Somebody could help me or show me how to make?
> Quite other idea will be welcome.
>
> Thank you in advance.
> Noro
Thursday, March 22, 2012
HTML completion - VS.NET 7.1
I'm working on an ASP.NET application, written in C#, using VS.NET .
When working on aspx pages, HTML completion does not work (neither tag
closing nor statement completion). Completion works fine for code behind
files and for HTML written in ascx user control files.
My definitions looks fine:
Tools->Options->Test Editor->HTML/XML->HTML specific:
* 'Auto pop-up HTML statement completion' is checked.
* 'Auto pop-up scripting statement completion' is checked.
* 'Close tag' is checked.
If anyone has any ideas or directions it would be a big help.
Thanks
HTML completion - VS.NET 7.1
I'm working on an ASP.NET application, written in C#, using VS.NET .
When working on aspx pages, HTML completion does not work (neither tag
closing nor statement completion). Completion works fine for code behind
files and for HTML written in ascx user control files.
My definitions looks fine:
Tools->Options->Test Editor->HTML/XML->HTML specific:
* 'Auto pop-up HTML statement completion' is checked.
* 'Auto pop-up scripting statement completion' is checked.
* 'Close tag' is checked.
If anyone has any ideas or directions it would be a big help.
Thanks
Wednesday, March 21, 2012
HTML and ASPX
I have a .net (aspx) web site that also contains some straight HTML pages.
I can send data between aspx pages using Visual Basic .NET:
Session("Something") = Value
Is there a way to send data from the HTML Page to the ASPX (.NET) page?
I need to retrieve the Value from the code behind page of the ASPX page.
Any suggestions will be greatly appreciated.
Thanks,
Chuckyou can use querystrings or hidden fields to pass values from htm to aspx
"Charles A. Lackman" <Charles@.cet.com> wrote in message
news:uWdivuCKEHA.2680@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I have a .net (aspx) web site that also contains some straight HTML
pages.
> I can send data between aspx pages using Visual Basic .NET:
> Session("Something") = Value
> Is there a way to send data from the HTML Page to the ASPX (.NET) page?
> I need to retrieve the Value from the code behind page of the ASPX page.
> Any suggestions will be greatly appreciated.
> Thanks,
> Chuck
HTML and ASPX
I have a .net (aspx) web site that also contains some straight HTML pages.
I can send data between aspx pages using Visual Basic .NET:
Session("Something") = Value
Is there a way to send data from the HTML Page to the ASPX (.NET) page?
I need to retrieve the Value from the code behind page of the ASPX page.
Any suggestions will be greatly appreciated.
Thanks,
Chuckyou can use querystrings or hidden fields to pass values from htm to aspx
"Charles A. Lackman" <Charles@.cet.com> wrote in message
news:uWdivuCKEHA.2680@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I have a .net (aspx) web site that also contains some straight HTML
pages.
> I can send data between aspx pages using Visual Basic .NET:
> Session("Something") = Value
> Is there a way to send data from the HTML Page to the ASPX (.NET) page?
> I need to retrieve the Value from the code behind page of the ASPX page.
> Any suggestions will be greatly appreciated.
> Thanks,
> Chuck
>
>
HTML and ASP.NET
comfortable developing codebehind in the .aspx pages.
Can anyone direct me to some solid sources on the
intranet in how to implement the code behind in with
HTML. I am having a really hard time dynamically
displaying data or positioning things where I need them.
I finally figured out how to display variable info in a
page globally declaring a variable and displaying it with
<%= variable name%
Please advice or direct me.
Thanksuse an
<asp:Label...></asp:Label
and then populate it from the codebehind
yourLabel.Text = "hello world";
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"brians" <bshannon@.lbrspec.com> wrote in message
news:073401c3d167$eef5f900$a001280a@.phx.gbl...
> I am a newbie with internet development. I feel pretty
> comfortable developing codebehind in the .aspx pages.
> Can anyone direct me to some solid sources on the
> intranet in how to implement the code behind in with
> HTML. I am having a really hard time dynamically
> displaying data or positioning things where I need them.
> I finally figured out how to display variable info in a
> page globally declaring a variable and displaying it with
> <%= variable name%>
> Please advice or direct me.
> Thanks
http://www.google.com/search?hl=en&...sp.net+tutorial
"brians" <bshannon@.lbrspec.com> wrote in message
news:073401c3d167$eef5f900$a001280a@.phx.gbl...
I am a newbie with internet development. I feel pretty
comfortable developing codebehind in the .aspx pages.
Can anyone direct me to some solid sources on the
intranet in how to implement the code behind in with
HTML. I am having a really hard time dynamically
displaying data or positioning things where I need them.
I finally figured out how to display variable info in a
page globally declaring a variable and displaying it with
<%= variable name%
Please advice or direct me.
Thanks