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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:22:59+00:00 2026-05-25T20:22:59+00:00

EDIT: Apparently, part of the problem is that while an ASP:GridView has an OnDataBound()

  • 0

EDIT:
Apparently, part of the problem is that while an ASP:GridView has an OnDataBound() event (which you can use in the code-behind), the corresponding HTML table that is produced does NOT, so you can attach that event to JavaScript. (Did I get that right?) So, that’s why I’m having trouble with that bit of the issue. Back to the drawing board.


I’m a desktop developer (WinForms with VB.NET) transitioning into ASP.NET development. My mind is really bending around the DOM and JavaScript and Session State and all of the stuff that goes along with web development. I’m not stupid, and I’ve done research (including hours of video watching and hundreds of pages of “Intro to ASP.NET” reading), but I keep hitting the wall with what seem to be fairly straightforward problems.

Basically, my current situation can be summed up as follows:

  1. I have a page that runs a very long process initiated by the user.
  2. The long process can take up to a few minutes , so I want to indicate to the user that SOMETHING is happening.
  3. When the process has completed, I either have:
    a. Results to show in a GridView
    b. No results to show
  4. If I have results to show, I want to display them.
  5. If I have no results to show, I want to show a label to the user that says “No results to show.”

What’s working:

  1. I have a basic page where the user selects start and end dates and kicks off the check process.
  2. The check process works fine (using LINQ-to-SQL logic developed for a desktop version of this program).
  3. I’ve got an UpdatePanel on my page which shows a label and an animated gif to indicate that something’s happening.
  4. If I get results, they display appropriately in my GridView.

What’s not working:

  1. I’d love to give the user some sort of progress bar to indicate actual progress made toward completion rather than some endlessly-animating gif that doesn’t indicate much at all. I could calculate this value quickly and easily, but can’t figure out how to transfer said value from server to web page.

  2. I can’t figure out how to trigger an “unhide” event for the label. The long-running process is in a button’s click event handler, where I run my custom code and generate a DataTable, which I then save as a session variable, assign it as the GridView’s DataSource and call GridView.DataBind(). When I try to determine the contents of the DataTable and hide/reveal the label there, nothing seems to happen.

Problem #2 is really what I need to figure out in order to publish this web site. I’m assuming it involves a JavaScript solution, and I’ve tried some stuff, but I find that I’m truly guessing and don’t have a good grasp on what the solution should resemble.

Here’s the label I’d like to selectively reveal/make visible:

<tr>
    <td colspan="2" align="center">
        <h2><asp:Label runat="server" ID="lblNoMissing" Text="No Missing Documentation Found" Visible="false"></asp:Label></h2>
    </td>
</tr>

Here’s a JavaScript function I’m trying to test:

<script type="text/javascript">
    function databound() {
        var gridViewID = '<%=_gridView1.ClientID%>';
        var labelID = '<%=lblNoMissing.ClientID%>';
        var gridView = document.getElementById(gridViewID);
        if (gridView.rows.length > 0) {
            $get(labelID).style.visibility = "false";
        } else {
            $get(labelID).style.visibility = "true";
        }
    }
</script>

Problem: This fails (databound not a member of Default.aspx):

<asp:GridView ID="_gridView1" runat="server"
    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
    ForeColor="#333333" GridLines="Horizontal" PageSize="20" OnDataBound="databound();">
// Rest of GridView definition removed
</asp:GridView>

What am I missing?

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-25T20:23:00+00:00Added an answer on May 25, 2026 at 8:23 pm

    For problem #1, there are a whole bunch of free Javascript progress bars out there. As for your value that you can’t retrieve, try this:

    <asp:Label ID="ProgressValue" runat="server" visible="false" /> 
    

    And in your code behind.

    ProgressValue.Text = //Your value from your database. 
    

    And just reference it from your Javascript there.

    For your second problem, can’t you just do in your code behind (written in C#)

    //Process here
    if(IDofGridView.Rows != null) 
    {
        lblNoMissing.Visible = true; 
    }
    

    Or am I missing something?

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

Sidebar

Related Questions

EDIT: It turns out that the problem was with an input parm. Apparently, if
Edit : This question has already been asked and answered, and I apparently am
Edit: derp, using pageX/Y instead of clientX/Y -- apparently scrollBy expects input with that
Sorry, this is my first time using this forum. Apparently people can edit my
My model contains a class Section which has an ordered list of Statics that
EDIT: Apparently, the problem is in the read function: I checked the data in
And who has the authority to decide? Edit: Apparently I haven't succeeded in formulating
How can I edit the styling of these part of google +1 button? kinda
EDIT: I used, finally, inotify. As stefanB says, inotify is the thing to use.
EDIT: OK, I believe the following solutions are valid: Use the jQuery AOP plugin.

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.