473,466 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Web page size

Hi all,
With the advent of Service Pack 1 for Visual Studio 2005 we at last get
a possibility
to convert our old ASP.Net 1.1 web application to ASP.Net 2.0. We
converted it. And we were unpleasantly impressed. There are many just
praises about reduced ViewState but what about another controls?

For example:

LinkButton that causes validation renders as hyperlink with the script
in href attribute.
ASP.Net 1.1 (117 b)
javascript:{if (typeof(Page_ClientValidate) != 'function' ||
Page_ClientValidate()) __doPostBack('LinkButton1','')}
ASP.Net 2.0 (156 b)
javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("LinkButton1", "", true,
"", "", false, true))

You may say, that difference in 39 bytes is not so much. But with a
little rewriting of the source file it would be looked like
javascript:WebForm_DoPostBackWithOptions('LinkButt on1','',true,'','',false,true)
and difference become more essential. It's looks like nobody in VS2005
developer's team tries to optimize code.

I want to particularly point to validators:
ASP.Net 1.1 (241 b)
<span id="RequiredFieldValidator1" controltovalidate="TextBox1"
errormessage="Value required" display="Dynamic"
evaluationfunction="RequiredFieldValidatorEvaluate IsValid"
initialvalue="" style="color:Red;display:none;">Value required</span>
ASP.Net 2.0 (520 b)
<span id="RequiredFieldValidator1"
style="color:Red;display:none;">Value required</span>
+
script in the body of a page:
var RequiredFieldValidator1 = document.all ?
document.all["RequiredFieldValidator1"] :
document.getElementById("RequiredFieldValidator1") ;
RequiredFieldValidator1.controltovalidate = "TextBox1";
RequiredFieldValidator1.errormessage = "Value required";
RequiredFieldValidator1.display = "Dynamic";
RequiredFieldValidator1.evaluationfunction =
"RequiredFieldValidatorEvaluateIsValid";
RequiredFieldValidator1.initialvalue = "";

Four validators on a page - 1kB of the additional traffic. Pretty
good, isn't it?
Or I am wrong and in the most countries internet has already changed to
intranet and page size is unimportant?

Would like to hear expert's opinions.

Sorry for my English.

P.S. Source for all examples is empty page + 3 controls:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:LinkButton ID="LinkButton1"
runat="server">LinkButton</asp:LinkButton>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1"
Display="Dynamic" ErrorMessage="Value
required"></asp:RequiredFieldValidator>

Jan 12 '07 #1
3 2263
Thanks for anwser, Nate

I have nothing against cross-browswer compliant script, I do not
understand whether it is necessary put all code in the page body
instead of separate file.

As for custom validators: either it supports existing validation schema
(and has no any advantages) or implements its own (but it causes
rewriting all controls that use old schema: Button, LinkButton, etc).

Jan 12 '07 #2
ms decided xhtml conformance was desirable. this means no custom
attributes are allowed, so they had to be moved to javascript objects
and quotes must be quoted.
-- bruce (sqlwork.com)

marss wrote:
Hi all,
With the advent of Service Pack 1 for Visual Studio 2005 we at last get
a possibility
to convert our old ASP.Net 1.1 web application to ASP.Net 2.0. We
converted it. And we were unpleasantly impressed. There are many just
praises about reduced ViewState but what about another controls?

For example:

LinkButton that causes validation renders as hyperlink with the script
in href attribute.
ASP.Net 1.1 (117 b)
javascript:{if (typeof(Page_ClientValidate) != 'function' ||
Page_ClientValidate()) __doPostBack('LinkButton1','')}
ASP.Net 2.0 (156 b)
javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions(&quot;LinkButton1&quot;, &quot;&quot;, true,
&quot;&quot;, &quot;&quot;, false, true))

You may say, that difference in 39 bytes is not so much. But with a
little rewriting of the source file it would be looked like
javascript:WebForm_DoPostBackWithOptions('LinkButt on1','',true,'','',false,true)
and difference become more essential. It's looks like nobody in VS2005
developer's team tries to optimize code.

I want to particularly point to validators:
ASP.Net 1.1 (241 b)
<span id="RequiredFieldValidator1" controltovalidate="TextBox1"
errormessage="Value required" display="Dynamic"
evaluationfunction="RequiredFieldValidatorEvaluate IsValid"
initialvalue="" style="color:Red;display:none;">Value required</span>
ASP.Net 2.0 (520 b)
<span id="RequiredFieldValidator1"
style="color:Red;display:none;">Value required</span>
+
script in the body of a page:
var RequiredFieldValidator1 = document.all ?
document.all["RequiredFieldValidator1"] :
document.getElementById("RequiredFieldValidator1") ;
RequiredFieldValidator1.controltovalidate = "TextBox1";
RequiredFieldValidator1.errormessage = "Value required";
RequiredFieldValidator1.display = "Dynamic";
RequiredFieldValidator1.evaluationfunction =
"RequiredFieldValidatorEvaluateIsValid";
RequiredFieldValidator1.initialvalue = "";

Four validators on a page - 1kB of the additional traffic. Pretty
good, isn't it?
Or I am wrong and in the most countries internet has already changed to
intranet and page size is unimportant?

Would like to hear expert's opinions.

Sorry for my English.

P.S. Source for all examples is empty page + 3 controls:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:LinkButton ID="LinkButton1"
runat="server">LinkButton</asp:LinkButton>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1"
Display="Dynamic" ErrorMessage="Value
required"></asp:RequiredFieldValidator>
Jan 12 '07 #3

bruce barker wrote:
ms decided xhtml conformance was desirable. this means no custom
attributes are allowed, so they had to be moved to javascript objects
and quotes must be quoted.
-- bruce (sqlwork.com)
Hello, Bruce,
I completely disagree with you about impossibility of custom attributes
use in xhtml compliant pages, but anyway, thanks for your opinion.

Jan 15 '07 #4

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

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
1
by: Arun Nair | last post by:
Hi, I have the following jsp page. I am able to view only a part of it(until the occurence of the first City text box). If i remove the first few fields from the page, I am able to see a few...
7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
0
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as ...
0
by: Jeff | last post by:
Hi - I have an ASP.NET page that hangs (some times; if it loads for you, try refresh/F5 several times) when I try to run it on my localhost. It contains an HTML table for formatting, and within...
1
by: Raja Shekar | last post by:
HI Every body , I would like to know whether is it mandatory to give Tablespace page size and Bufferpool page size equal..? i also heard like while creating tablespace if pages size of tablespace...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: soluvah | last post by:
Hello Folks, Been trying to widen my site's body from "779" to "1000" so it almost fills the window. IE 7 on windows XP just dismantles the pages and leaves wide gaps between the left column and...
3
by: hsahealthsavings | last post by:
I made this page using a free html editor called formbreeze. The issue is 1) There is a whole bunch of white space at the end of the page that I cannot seem to figure how to get rid of 2) I have...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
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,...
0
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...

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.