Prevent modifying Attribute

Discussion in 'ASP .Net' started by Chris Zopers, Jun 29, 2009.

  1. Chris Zopers

    Chris Zopers Guest

    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 Developersdex http://www.developersdex.com ***
     
    Chris Zopers, Jun 29, 2009
    #1
    1. Advertising

  2. On Jun 29, 1:35 pm, Chris Zopers <> wrote:
    > 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.
     
    Alexey Smirnov, Jun 30, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dilip

    Modifying form action attribute

    Dilip, Jul 6, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    556
    intrader
    Jul 6, 2005
  2. Matt
    Replies:
    2
    Views:
    541
  3. Replies:
    1
    Views:
    268
    Alex Martelli
    Feb 20, 2006
  4. hummh
    Replies:
    0
    Views:
    345
    hummh
    Aug 9, 2007
  5. hummh
    Replies:
    0
    Views:
    181
    hummh
    Aug 9, 2007
Loading...

Share This Page