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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:43:53+00:00 2026-05-27T08:43:53+00:00

So…I’m trying to find the client ID of a control (a hidden input field)

  • 0

So…I’m trying to find the client ID of a control (a hidden input field) which is part of a user control which is bound dynamically to a Grid view ‘Item template’.
I was trying to do the following in the “RowDataBound” event and doesn’t seem to work.

protected void grid_RowDataBound(object sender, GridViewRowEventArgs e)
{
        if (ShowSelectColumn)
        {

            HiddenField MfrHiddenField =  (e.Row.Cells[2].FindControl("MfrNumHiddenfield")) as HiddenField;
}

wherein “MfrNumHiddenfield” is the ID of the hidden input field. e.row.cells[2] is the cell number of the column to which the ‘user control’ is bound to…

below is how the user control gets added to the gridview:

    grid.Columns.Add(CreateTemplateField(
            path + "ManufacturerHeader.ascx",
            path + "ManufacturerCell.ascx"));

Is anything wrong with what i am trying to do? please 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-27T08:43:54+00:00Added an answer on May 27, 2026 at 8:43 am

    You don’t usually need to look in the cell. e.Row.FindControl("MfrNumHiddenfield") should be enough.

    Since you are looking for a control in a custom control, you could try:

    e.Row.FindControl("manufacturerCellControl").FindControl("MfrNumHiddenfield")
    

    I have never tried it, but it seems plausible.

    A better option would be to expose a property from the ManufacturerCell control to make the change you want. This would keep clients of the control from needing to understand the inner workings. Just create a property, and write the code in the get and set methods.

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

Sidebar

Related Questions

so I did $subject = 'sakdlfjsalfdjslfad <a href=something/8230>lol is that true?</a> lalalala'; $subject =
I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
I've successfully connected to XMPP server (from android XMPP client), and I can send
I have this xml <entry id=1008 section=articles> <excerpt><p>&#8230; in Richtung „Aus für Tierversuche. Kosmetik-Fertigprodukte
I would like to run a str_replace or preg_replace which looks for certain words
Why does the Android system throw this Exception? 05-18 12:33:44.169 W/System.err( 8230): java.io.IOException: Is
I have a form, one of the fields is a select field, with 5
I'm trying to write a script to launch xfce and xbmc in their own
I'm trying to work out why it won't let me attach a file from
CGI.escapeHTML is pretty bad, but CGI.unescapeHTML is completely borked. For example: require 'cgi' CGI.unescapeHTML('&#8230;')

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.