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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:38:27+00:00 2026-05-29T05:38:27+00:00

I have the follow line in my code HtmlControl divstatus = (HtmlControl)GridView1.Rows[j].FindControl(divstatus); and in

  • 0

I have the follow line in my code

HtmlControl divstatus = (HtmlControl)GridView1.Rows[j].FindControl("divstatus");

and in my .aspx

<div style="width:70px;" id="divStatus" runat="server"><%# Eval("DscStatus")%></div>

How can I get the value of my div in the codebehind using the class HtmlControl ?

My Grid View is too big, so i’ll post just a part

   <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%" CellPadding="4" 
        EnableModelValidation="True" ForeColor="#333333">
        <FooterStyle BackColor="#990000" ForeColor="White" Font-Bold="True" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="Chamado">
                <ItemTemplate>
                    <div style="width:30px;">
                       <a href='responder.aspx?cod=<%# Eval("Codigo") %>&sta=<%# Eval("StatusTicket_Id") %>&mot=<%# Eval("MotivoTicket_Id") %>'>
                                <%# Eval("Codigo") %>
                            </a>                                                                       
                        <%# montaAnexo(Eval("Anexo").ToString())%>                
                    </div>
                </ItemTemplate>                
            </asp:TemplateField>
  • 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-29T05:38:28+00:00Added an answer on May 29, 2026 at 5:38 am

    Update your line above this way

     HtmlControls.HtmlContainerControl divstatus = (HtmlControls.HtmlContainerControl)GridView1.Rows[j].FindControl("divstatus");
    

    Then access its innerText

     divstatus.InnerText
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the follow code: searchResults.SearchResultCollection.Add( new SearchResult() { Header = HttpUtility.HtmlDecode( htmlDocument.DocumentNode .SelectSingleNode(initialXPath
Scenario I have a line of code whereby I pass a good number of
I have the follow code: string DB1 = DB1 = Regex.Match(contents, @DB1=(?<DB1>[^\r\n]+)).Groups[DB1].Value; The code
I have the following code, should be easy to follow through public class Foo
I have checked out code using command-line SVN. I have an Ant build script
I have this line in my code: $item=$page->items; $page is an array, and its
I have an issue about http://code.google.com/p/django-simple-captcha/ project. I've follow the procedure to install captcha,
What follows is a regular expression I have written to match multi-line pre-processor macros
i have follow taxomony has been set up: accommodation -backpacker -guest -holiday and i
I have the follow Linq query ... which executes correctly: from t in Tasks

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.