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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:05:20+00:00 2026-05-31T13:05:20+00:00

This might be very basic question to some but I am struggling for quite

  • 0

This might be very basic question to some but I am struggling for quite some time.

I created an aspx page which has a search ability on User Table (Database). When Search button is cliked related Grid is filled with UserNames. And I put an Edit HyperLink in every row right next to UserName Column.

However Edit button should get a parameter named “UserCode” (this information also comes when I retrieved the names) but I just couldn’t write the appropriate code to the related line. Please in my codes there is a line contains I DONT KNOW WHAT TO TYPE IN HERE. Instead of index solution, any other suggestions are welcome.

    DataTable oDataTable;
    DataView oDataView;

    protected void SearchLinkButton_Click(object sender, EventArgs e)
    {
        MembershipUserCollection allUsers = Membership.GetAllUsers();
        if (allUsers != null)
        {
            oDataTable = new SystemUserAccountBsWrapper().SearchAllUsers(null); //Fetchs all user data
            oDataView = oDataTable.DefaultView;
            oDataView.Sort = "UserName";
            oDataView.RowFilter = "UserName LIKE '%" + UserNameTextBox.Text + "%'";
            UserGridView.DataSource = oDataView;
            UserGridView.DataBind();
        }
    }
    protected void UserGridView_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            HyperLink EditHyperLink = (HyperLink)e.Row.FindControl("EditHyperLink");
            EditHyperLink.NavigateUrl("EditUserInfo.aspx?key=" + oDataTable.Rows[**I DONT KNOW WHAT TO TYPE IN HERE**]["UserCode"]);
        }
    }

Sorry for my bad English.

  • 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-31T13:05:21+00:00Added an answer on May 31, 2026 at 1:05 pm

    DataBinder.Eval can be used on codebehind also

    EditHyperLink
          .NavigateUrl("EditUserInfo.aspx?key=" + DataBinder.Eval(e.Row.DataItem,"UserCode"),650, 500, true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know, this might be a very basic question but I am not 100%
This might be a very basic question, but I'm getting a bit confused. I'm
This might be a very basic question, but I am a bit confused about
This might be a very basic question, but have not found a convincing answer
This might be a very newbie question, but I didn't find anything satisfying I
I understand this might be a very basic question. Windows Azure needs me to
This question might be very basic. Till now I thought a command to print
This might seem like a silly question, but after asking some questions on stackoverflow
okay this might be a pretty lame and basic question but its stuck in
Sorry for english this might be very basic Question, I have an Application where

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.