Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7693365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:04:19+00:00 2026-05-31T21:04:19+00:00

For example, Lets say that I have a gridview column which has important controls,

  • 0

For example, Lets say that I have a gridview column which has important controls,

Does it secure if I make them invisible on regular users, and visible for admin users?

If (Requst.Servervariables.Get("LOGON_USER").Split('\\')[1] == "MyAdminUser")
{
     gridview1.columns[0].visible = true;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:04:20+00:00Added an answer on May 31, 2026 at 9:04 pm

    The control is stored in the Viewstate even if the visibility is set to false. The viewstate isn’t encrypted, it’s just Base-64 encoded. Theoretically, it is possible to parse the viewstate and extract values, so it’s not 100% secure, but it would be difficult for most people to exploit the weakness and extract the values.

    For minor things it’s probably OK to do this, but if you’re protecting really sensitive data, I’d find another method for hiding the data, or just not have it go to the client at all. For a control, maybe add it dynamically in code-behind for admin users rather than setting it’s visibility to false.

    And of course, practice defense-in-depth.

    Simply hiding controls is known as “Security by obscurity” which isn’t much security at all. It IS a valid additional layer of security, but you should absolutely not be relying on it (hiding links to sensitive information assuming that you can’t get to it if you don’t know the URL, for example). If you do use it to hide links, you still need to protect those pages with as much care as you would if the links weren’t “hidden”. There are many ways that attackers find such “hidden” links.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To use as an example: lets say that I have 2 EditText s and
For example lets say I have a JSON object that contains states and cities.
Lets say, for example, I have a container that takes up 100% of the
For example, let's say I have a Maven build file that has dependencies located
I have 2 websites, lets say - example.com and example1.com example.com has a database
Lets say that we have a local variable of value type (struct for example).
Scenario Lets say for example I have a series of events that fire continually
I have a UserControl (lets say Foo.ascx) that has a Type public property with
There is a container, for example lets say which has a volume of V.
How does CouchDB handles conflicts while doing bi-directional replication? For example: Lets say there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.