CheckBox Render Method

G

Gary Coutts

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top