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

  • Home
  • SEARCH
  • 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 6649001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:43:21+00:00 2026-05-26T00:43:21+00:00

I have asp.net page where I am using a gridView with custom paging and

  • 0

I have asp.net page where I am using a gridView with custom paging and within the gridview there is a DropDownList control and per-row control-based javascript that does a form submit and must refer to a unique DropDownList name pertaining to it’s row.

Usually if I need to manipulate controls I have been accustomed to using the “on databinding to row” type of event to “FindControl”. But in this case I cannot do this because the client script will only refer to this control after it is rendered.

In the grid view template area where the DropDownList is placed, I tried to output something of the sort:

... ID='<%# Eval("myID") + "_ddl" %>' ...

..just as an example, but the compiler/parser said “Bark, Bark, growl Bark” you can’t do this because an id for the DopDownList can’t be assigned like this. I also attempted to assign the CLientID of the control on row databind, but it wouldn’t allow that either because that is a write only property.

Is there any easy way to actually take control of the ddl name? I really want to avoid changing the structure of what is going. I don’t need to find the ddl name, I actually need to make every ddl in each row unique. The onclick is actually coming from another control in its row. and Unfortunately the JavaScript is inline. The issue is that the javascript is looking for the ddl with a unique name and in grid view the names for the ddl are all the same. My question is how do I force a unique name ID for the ddl in a grid view. Can this be done. It won’t allow me in the methods that i have mentioned above.

Some background on this is that, this data used to be in a plain table with no paging. I had to move it into a gridview and do a custom paging.

Advice is much appreciated..Thanks!

  • 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-26T00:43:22+00:00Added an answer on May 26, 2026 at 12:43 am

    I’m not sure which problem you trying to solve. It could be, I’m on the dropdown and I need to find the ClientId. Then use the answer in Chris Mullins’s answer to How do I find the Client ID of control within an ASP.NET GridView?

    Which is use '<%# ((GridViewRow)Container).FindControl("ddlName").ClientID %>'

    If its I need to get the dropdown from outside the control then you can loop through the grid as described in How to get cell value of gridview using JQUERY

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

Sidebar

Related Questions

I have an ASP.NET page using the AJAX control toolkit for some controls. A
I have an ASP.NET GridView control with two asp:CommandField columns that are both using
I have a ASP.Net page using ADO to query MS access database and as
I have a asp.net webforms page in which I'm using the jqGrid component. The
I have an asp.net web page written in C#. Using some javascript I popup
I have an ASP.NET website where i have implemented page level caching using the
I'm working on an ASP.NET page, using VB.NET and I have this hierarchy: Page
I have an ASP.NET website set up, and I'm using Google Analytics for page
I have an interesting problem when using partial page update in asp.net with scriptmanager
I'm using ASP.NET MVC 2 and have a login page that is secured via

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.