473,796 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server.HTMLEnco de and performance

Hi,

I'm dynamically loading an assembly into an ASP.NET application. In the
control that I load from that dynamic assembly I've tried to use
Server.HTMLEnco de but this results in a serious performance loss. Is there
anyone who knows why or is there an alternative for server.htmlenco de
method? Without the server.htmlenco de the thingy works very fine.

greetz

Michael
Nov 18 '05 #1
3 4111
The HtmlEncode mathod will work as fast as the length of the string you are
encoding. If the string is short, it will be fast. If the string is long, it
will be slow.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Michael Gaillez" <mi************ *@howest.be> wrote in message
news:uS******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

I'm dynamically loading an assembly into an ASP.NET application. In the
control that I load from that dynamic assembly I've tried to use
Server.HTMLEnco de but this results in a serious performance loss. Is there
anyone who knows why or is there an alternative for server.htmlenco de
method? Without the server.htmlenco de the thingy works very fine.

greetz

Michael

Nov 18 '05 #2
Ok that I can understand. But that is not the reason why I'm losing
performance in this application. If I'm doing exactly the same thing without
an dynamic assembly load it works pretty fast. If I use it with assembly
load it works very slow. So in my opinion the length doesn't really matter
in this case. But what I've found meanwhile is the httputility class were
the functionallity resides from. I will try that because then I don't have
to do this: "Page.Server... .." . My guess is that this should do the trick
because reflection might not handle page.server very well.

greets

Michael

"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uI******** *****@TK2MSFTNG P11.phx.gbl...
The HtmlEncode mathod will work as fast as the length of the string you are encoding. If the string is short, it will be fast. If the string is long, it will be slow.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Michael Gaillez" <mi************ *@howest.be> wrote in message
news:uS******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

I'm dynamically loading an assembly into an ASP.NET application. In the
control that I load from that dynamic assembly I've tried to use
Server.HTMLEnco de but this results in a serious performance loss. Is there anyone who knows why or is there an alternative for server.htmlenco de
method? Without the server.htmlenco de the thingy works very fine.

greetz

Michael


Nov 18 '05 #3
The HttpUtility.Htm lEncode method will definitely work faster, as it is
static.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Michael Gaillez" <mi************ *@howest.be> wrote in message
news:ez******** ******@TK2MSFTN GP11.phx.gbl...
Ok that I can understand. But that is not the reason why I'm losing
performance in this application. If I'm doing exactly the same thing without an dynamic assembly load it works pretty fast. If I use it with assembly
load it works very slow. So in my opinion the length doesn't really matter
in this case. But what I've found meanwhile is the httputility class were
the functionallity resides from. I will try that because then I don't have
to do this: "Page.Server... .." . My guess is that this should do the trick
because reflection might not handle page.server very well.

greets

Michael

"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uI******** *****@TK2MSFTNG P11.phx.gbl...
The HtmlEncode mathod will work as fast as the length of the string you are
encoding. If the string is short, it will be fast. If the string is long, it
will be slow.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Michael Gaillez" <mi************ *@howest.be> wrote in message
news:uS******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

I'm dynamically loading an assembly into an ASP.NET application. In the control that I load from that dynamic assembly I've tried to use
Server.HTMLEnco de but this results in a serious performance loss. Is

there anyone who knows why or is there an alternative for server.htmlenco de
method? Without the server.htmlenco de the thingy works very fine.

greetz

Michael



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1567
by: Hraklhs | last post by:
Is it useful to ALWAYS use Server.HTMLEncode when writing data read from a db? Ex. Response.Write (Server.HTMLEncode(var)) instead of Response.Write var
4
4088
by: abcd | last post by:
Simple but not working at this moment I have to fill the HTML select control.... my values could be for example "test number 1" sample code, dim x Data = "test number 1"
4
10657
by: Andrea Williams | last post by:
I have a class that imports System.Web.UI.Page. The code below works: public string JScriptEncode(string strValue) { strValue = strValue.Replace(@"'", "\x27"); //' JScript encode apostrophes strValue = strValue.Replace(@"""", "\x22"); //' JScript encode double-quotes
3
5752
by: Mark Rae | last post by:
Hi, The following is lifted straight from the MSDN help topic for HttpServerUtility.HtmlEncode Method --------------------------------------------------------------- The following example encodes a string for transmission by HTTP. It encodes the string named TestString, which contains the text "This is a <Test String>.", and copies it into the string named EncodedString as "This+is+a+%3cTest+String%3e.".
3
1759
by: TCB | last post by:
Hi, There are a couple of things that are bothering me, any help on these is greatly appreciated. This is using ASP.NET 2.0 1. I am sending email in my web app, using a simple form here is the code: Dim MyMailFrom As New Net.Mail.MailAddress("portal@xxx.com", "Portal XX.com") Dim MyMailTo As New Net.Mail.MailAddress("info@xxx.com")
4
4969
by: Fossie | last post by:
Can anyone help with Server.HtmlEncode encoding this? '<%# DataBinder.Eval(Container.DataItem, "CAT_ID", "pageview.aspx?tab=1&catid={0}") %> I've tried using similar to this: <%# Server.HtmlEncode(DataBinder.Eval(Container, "DataItem.Field1").ToString()) %> but get error message BC30455: Argument not specified for parameter '
1
14566
by: Marco Miltenburg | last post by:
While working on some multilingual code I found a rather strange thing happening with Server.HTMLEncode. While loading different languages I change the Codepage and Charset in ASP to reflect the language. This all works fine. However when I tried to use Charset UTF-8 with Codepage 65001 everywhere I found that HTMLEncode always translates all UTF-8 characters to &#xxxx. Example:
1
9524
by: burnsy2000 | last post by:
We are running ASP classic on IIS 5 on W2k SP4. We recently added <% Response.charset="utf-8"%to the top of all our pages (as suggested by validator.w3.org). A problem arose on a page which applies Server.HTMLEncode to a field that was inputted from the user. The problem is that when the user enters a phrase such as: My Fiancé The Server.URLEncode returns the value:
6
2334
by: teddysnips | last post by:
In my application I need to allow users to cut 'n' paste stuff from various sources, some of which might include dodgy characters such as "<". Natch, IE interprets these as potentially dangerous and provides a mechanism to encode/decode them. However I can't seem to get it to work: .... <asp:textbox id=txtDescription style="Z-INDEX: 102; LEFT: 111px; POSITION: absolute; TOP: 124px" tabIndex=29 runat="server" onblur="return...
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10236
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.