473,326 Members | 2,013 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,326 software developers and data experts.

CheckBox Render Method

Hi,

I was looking at the Render Method for a checkbox ( to get a better understanding how the Markup is generated) , part of the method is shown below:

if (base.HasAttributes)
{
AttributeCollection collection1 = base.Attributes;

string text3 = collection1["value"];
if (text3 != null)
{
collection1.Remove("value");
}

text2 = collection1["onclick"];
if (text2 != null)
{
collection1.Remove("onclick");
}

if (collection1.Count != 0)
{
collection1.AddAttributes(writer);
flag1 = true;
}

if (text3 != null)
{
collection1["value"] = text3;
}
}

Can anyone tell me why it looks for the "value" key and the "onclick" key and removes them then re-instates the "value" key.
I am using VS2003 with ASP1.1.
Thank you in advance

Cheers

gwc
Jul 4 '06 #1
0 767

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

Similar topics

2
by: Czarina | last post by:
hi guys! here I am again, bugging you Here is where my page stands right now: http://www.gainesvillewebs.com/czar...h_results-2.htm The top 2 forms are working just fine, but the bottom one, with...
2
by: Tomas Vera | last post by:
Hello All, I'm having problems creating a page with dynamic checkboxes in a WebApp. In my app, I need to query a database, then (based on results) add checkboxes to my form and set their...
4
by: RodBillett | last post by:
I have a situation where I have 3 checkboxes - and at least 1 needs to be selected at all times... I have implemented the code that allows this behavior to happen, BUT Viewstate gets all messed...
1
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a...
3
by: André Nobre | last post by:
Hi all... How can I call a java script function when user clicks on my asp:checkbox control? It's obvious that server control events doesn't work, because it runs on server.. So, how can i...
0
by: Graham | last post by:
Is there a known bug with the CheckBox control? I have subclassed the control and I am trying to add an onclick attribute in the code behind. I've tried putting the Attributes.Add in the Page_Load,...
1
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem:...
11
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, I have a large recordset to be displayed on a ASP 3.0 page. I am using recordset paging for this. For the next and previous link i am passing href as <a href=<Page URl>?page=<%=...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 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.