473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Strange Source

A ASP.NET page has only a DataGrid control whose ID is "DGrid1". The
Page_Load sub looks like this::

Sub Page_Load(.....)
'binding the DataGrid
'to some data source

Dim child As Control
For Each child In DGrid1.Controls
'Response.Write(child.GetType())
Response.Write(child.ClientID)
Next
End Sub

<asp:DataGrid ID="DGrid1" AutoGenerateColumns="false"
BorderColor="dodgerblue" CellPadding="1" CellSpacing="1"
EnableViewState="true" GridLines="both"
HeaderStyle-BackColor="dodgerblue" HeaderStyle-Font-Bold="true"
HeaderStyle-Font-Names="courier new" HeaderStyle-Font-Size="smaller"
HeaderStyle-ForeColor="white" HeaderStyle-HorizontalAlign="center"
ItemStyle-Font-Names="courier new" ItemStyle-Font-Size="smaller"
ShowFooter="false" Width="500" runat="server">

Note that the first Response.Write line is commented.

Now when I have a look at the source code of the ASPX page (by
navigating to "View"---->"Source" menu in IE6.0), then the
corresponding HTML of the DataGrid is this:

<table id="DGrid1_ctl00" cellspacing="1" cellpadding="1" rules="all"
border="1" id="DGrid1" style="border-color:DodgerBlue;width:500px;">

Note that the HTML <tablehas 2 "id" attributes - 'DGrid1_ctl00' &
'DGrid1'. Next I uncomment the first Response.Write line & comment the
second Response.Write line in the above code. Then the corresponding
HTML source of the DataGrid turns out to be

<table cellspacing="1" cellpadding="1" rules="all" border="1"
id="dgMarks" style="border-color:DodgerBlue;width:500px;">

In this case, the HTML <tablehas only 1 "id" attribute.

Now why this discrepancy in the source code?

Note that the page behavior remains the same under both circumstances.

Dec 8 '06 #1
0 1032

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

Similar topics

2
by: demetrius | last post by:
I have encounter what I think is the strangest bug I have ever seen and was wondering if anyone else has ever experienced anything similar or might know the cause of this problem. I have...
4
by: Zhang Weiwu | last post by:
This is really very stange. I have a form like this: <form id="form_A"> xxxx </form> This form is on one page in a page of a web application, it is the only form on that page. on the end of...
2
by: Antonio | last post by:
Good morning, everyone. Here is the strange behavior: I have a datagrid (dgPIs) with paging enabled. When I click to view any page in the grid, it runs the private void lnkIPReg method,...
4
by: Gregor Kovač | last post by:
Hi! When I'm using IMPORT with INSERT_UPDATE I sometimes get SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. I'm not sure why this happens....
1
by: Mark Morss | last post by:
Is this the place to ask a win32com.client question? I am a unix person trying to run on windows, so I have little familiarity with this module. I have this code: import win32com.client ...
1
by: =?ISO-8859-1?Q?thib=B4?= | last post by:
Hi, Taking a closer look to highlight_file() lastly, I found out that its line break policy was a bit.. strange. <?php # highlight_file() line breaks test $f = fopen('highlight_file_test',...
8
by: Dox33 | last post by:
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples....
7
by: email7373388 | last post by:
I'm working on a program which has a strange operator, :>. This is the syntax: ((unsigned short)( var1)):>((void __near *)( var2 )) Any clue?
2
by: angryRotarian | last post by:
Im trying to write a MPI C program for a debian cluster that multiplies matricies. Ive written almost all of it, but cant seem to shake a strange problem. Here is the code: #include <stdio.h>...
5
by: GuyBowden | last post by:
Hi I'm trying to figure out why a certain server is rendering out strange html Sometimes it renders out html code to the browser window. See here: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.