Prevent modifying Attribute

  • Thread starter Thread starter Chris Zopers
  • Start date Start date
C

Chris Zopers

Hello,

We've developed a Web Application with inputforms that are being
generated dynamically, including all WebControls on the forms.

In each WebControl we save some data in specific Attributes, so when the
user clicks a Save button, we have some extra information for each
WebControl.

For Example:

TextBox txb = New TextBox();
txb.Attributes["NewExampleAttribute"] = "HelloWorld";

This Attribute is of course invisble to the user. But when a User has
installed the Developer Toolbar, he can find the control and view it's
attributes. But he can also modify the value of those attributes and we
don't want that. Is there a way to prevent this? As far as I can see,
the AttributesCollection is of type String, so no settings can be
applied to make a new Attribute readonly.

Greetings,
Chris
 
Hello,

We've developed a Web Application with inputforms that are being
generated dynamically, including all WebControls on the forms.

In each WebControl we save some data in specific Attributes, so when the
user clicks a Save button, we have some extra information for each
WebControl.

For Example:

TextBox txb = New TextBox();
txb.Attributes["NewExampleAttribute"] = "HelloWorld";

This Attribute is of course invisble to the user. But when a User has
installed the Developer Toolbar, he can find the control and view it's
attributes. But he can also modify the value of those attributes and we
don't want that. Is there a way to prevent this? As far as I can see,
the AttributesCollection is of type String, so no settings can be
applied to make a new Attribute readonly.

Greetings,
Chris

*** Sent via Developersdexhttp://www.developersdex.com***

What is "Developer Toolbar"? If it's a kind of debug/hack extension
than it probably may modify everything in the output.
 
Back
Top