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 7997507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:58:53+00:00 2026-06-04T14:58:53+00:00

I have a question about what would be the best practice for creating a

  • 0

I have a question about what would be the best practice for creating a conditional statement for a GridView in ASP.NET. I have a badge number that is being passed into a new page containing a GridView and depending on that badge number, I want to have it check whether or not the user has permissions (from another db table) and display the “Edit” button if they have permission.

I guess I’m not sure about how to accomplish this. I have tried searching and the best I can come up with is to do it during a databound event.

Any insight on this topic would be great! Thanks!

Here is the code I have right now (the auto generated edit button for gridviews):

 <Columns>
 <asp:CommandField ShowEditButton="True" />
etc
etc
etc
 </Columns>
  • 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-06-04T14:58:54+00:00Added an answer on June 4, 2026 at 2:58 pm

    In the row databound function of the gridview you could make a call to the other db and work out whether to show the button or not. You can find the control in the gridview and then set it to be invisible.

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

Sidebar

Related Questions

I have a question about complex views in ASP.NET MVC. Where can I find
This is a general best practice question about creating parent / child relationships with
A quick question about best practice with PHP classes. I have seen people use
Quick question on best practice. I have an AJAX application where there are 4
A question I have been thinking about for a while - would Stackoverflow users
So I have, what would seem like a common question that I can't seem
I have question about normalization. Suppose I have an applications dealing with songs. First
I have question about interpreting strings as packed binary data in C++. In python,
i have question about YAJLiOS parser... I have next json data : {{ body
I have a question about whether or not a specific way of applying of

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.