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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:27:06+00:00 2026-05-18T20:27:06+00:00

i think this maybe an easy one… I have a Gridview, bound to a

  • 0

i think this maybe an easy one…
I have a Gridview, bound to a dataSource with this query:
select userid, name, phone from users
I need to change the content of the Name cell to a link, like so:
<a href="http://www.domain.com/page.aspx?userid=12345">User's Name</a>
so OnRowDataBound i’m doing this:

e.Row.Cells[1].Text = "<a href=\"http://www.domain.com/page.aspx?userid=\" + e.Row.Cell[0].Text + "\">" + e.Row.Cells[1].Text + "</a>"; 

It all works fine this way. My problem is that i don’t want to display the UserId column in the Gridview, but when i attribute it (asp attribute or server-side) Visible="false" to the BoundField UserId, i can’t capture it’s value to build the Name Cell.

Thanx for your help

  • 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-18T20:27:06+00:00Added an answer on May 18, 2026 at 8:27 pm

    Make your gridView to use template items instead of simple grivdiew column.

    <asp:TemplateField HeaderText="FirstName" SortExpression="FirstName"> 
      <EditItemTemplate> 
          <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("FirstName")%>'>
          </asp:TextBox> 
          </EditItemTemplate> 
       <ItemTemplate> 
          <asp:Label ID="Label1" runat="server" Text='<%# Bind("FirstName") %>'>
         </asp:Label> 
     </ItemTemplate> 
    </asp:TemplateField>
    

    You can find a nice intro Here

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

Sidebar

Related Questions

i think this maybe an easy one... I have a Gridview, bound to a
I think I already know the answer to this one, but i hope maybe
I think this could be a very easy question for you. But I have
Relatively new to mySQL so this is probably an easy one: I have a
I think this may be relatively straight forward. I have a rewrite rule that
Hopefully this question isn't as subjective as I think it may be. I have
I think this is a simple and a silly question. I have included a
I'd think there was a question on this already, but I can't find one.
I've got a, I think fairly easy question, but this is bugging me for
I think this is a common scenario - I have a view where I

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.