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 3 4114
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
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
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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"
|
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
|
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.".
|
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")
| |
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 '
|
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:
|
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:
|
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...
|
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...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
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
| |