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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:33:52+00:00 2026-05-26T12:33:52+00:00

before I begin, there is another question with a similar title and it is

  • 0

before I begin, there is another question with a similar title and it is unsolved but my situation is pretty different since I am using Ajax.

I recently added a label to my Ajax UpdateProgress control and for some reason my asp.net page is not reading it. My original goal was for the text of the label to be constantly be updating while the long method runs. I am using code behind, and I believe the label is declared. I will post my .cs page if anyone would like to read through it (its not too long), All my other labels work perfectly and even if I take the label OUT of the ajax control it will work fine (not the text updates though). Is there a certain Ajax label I need to use?

Im pretty confused why the error is occurring. The exact error message states : “The name ‘lblProgress’ does not exist in the current context. Im using c#, ajax controls, a asp.net page, and visual studio. This program uploads a file to a client and stores the information in a database. If anyone can help I would really appreciate it. Thanks in advance!

    using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Threading;


public partial class SendOrders : System.Web.UI.Page
{
protected enum EDIType
{
    Notes,
    Details
}

protected static string NextBatchNum = "1";
protected static string FileNamePrefix = "";
protected static string OverBatchLimitStr = "Batch file limit has been reached.  No more batches can be processed today.";

protected void Page_Load(object sender, EventArgs e)
{
    Initialize();
}
protected void Page_PreRender(object sender, EventArgs e)
{
}
protected void Button_Click(object sender, EventArgs e)
{
    PutFTPButton.Enabled = false;
    lblProgress.Visible = true;
    lblProgress.Text = "Preparing System Checks...";
    Thread.Sleep(3000);
    Button btn = (Button)sender;
    KaplanFTP.BatchFiles bf = new KaplanFTP.BatchFiles();
    KaplanFTP.Transmit transmit = new KaplanFTP.Transmit();

    if (btn.ID == PutFTPButton.ID)
    {
        lblProgress.Text = "Locating Files...";
        //bf.ReadyFilesForTransmission();
        DirectoryInfo dir = new DirectoryInfo(@"C:\Kaplan");
        FileInfo[] BatchFiles = bf.GetBatchFiles(dir);
        bool result = transmit.UploadBatchFilesToFTP(BatchFiles);
        lblProgress.Text = "Sending Files to Kaplan...";
        if (!result)
        {
            ErrorLabel.Text += KaplanFTP.errorMsg;
            return;
        }
        bf.InsertBatchDataIntoDatabase("CTL");
        bf.InsertBatchDataIntoDatabase("HDR");
        bf.InsertBatchDataIntoDatabase("DET");
        bf.InsertBatchDataIntoDatabase("NTS");
        List<FileInfo> allfiles = BatchFiles.ToList<FileInfo>();
        allfiles.AddRange(dir.GetFiles("*.txt"));
        bf.MoveFiles(allfiles);
        lblProgress.Text = "Uploading File Info to Database...";
        foreach (string order in bf.OrdersSent)
        {
            OrdersSentDiv.Controls.Add(new LiteralControl(order + "<br />"));
        }
        OrdersSentDiv.Visible = true;
        OrdersInfoDiv.Visible = false;
        SuccessLabel.Visible = true;
        NoBatchesToProcessLbl.Visible = true;
        BatchesToProcessLbl.Visible = false;
        PutFTPButton.Enabled = false;
        BatchesCreatedLbl.Text = int.Parse(NextBatchNum).ToString();
        Thread.Sleep(20000);

        if (KaplanFTP.errorMsg.Length != 0)
        {
            ErrorLabel.Visible = true;
            SuccessLabel.Visible = false;
            ErrorLabel.Text = KaplanFTP.errorMsg;
        }
    }
}

Here is my aspx code as well.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SendOrders.aspx.cs" Inherits="SendOrders" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>Kaplan EDI Manager</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 220px;
            height: 19px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="mainPanel">
        <div>
            <h3>Number of Batches Created Today: <asp:Label runat="server" style="display:inline;" ID="BatchesCreatedLbl"></asp:Label>
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <span class="red">COUNTDOWN TO SUBMISSION!</span>
                <span id="timespan" class="red"></span>
            </h3>
        </div>
        <div id="batchestoprocessdiv">
        </div>

        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Label ID="BatchesToProcessLbl" runat="server" CssClass="green" 
                    Height="22px" Text="THERE IS AN ORDER BATCH TO PROCESS."></asp:Label>
                <asp:Label ID="NoBatchesToProcessLbl" runat="server" CssClass="red" 
                    Text="There are no Order Batches to Process." Visible="false"></asp:Label>
                <asp:Button ID="PutFTPButton" runat="server" onclick="Button_Click" 
                    Text="Submit Orders" />
                <asp:Label ID="SuccessLabel" runat="server" CssClass="green" 
                    Text="Batch has been processed and uploaded successfully." Visible="false"></asp:Label>
                <asp:Label ID="ErrorLabel" runat="server" CssClass="red" Text="Error: " 
                    Visible="false"></asp:Label>
                <asp:Label ID="lblProgress" runat="server" CssClass="green" Height="16px" 
                    Text="Label" Visible="False"></asp:Label>
                <br />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
            AssociatedUpdatePanelID="UpdatePanel1">
            <ProgressTemplate>
                <br />
                <img alt="" class="style1" src="images/ajax-loader.gif" />
            </ProgressTemplate>
        </asp:UpdateProgress>
    </div>
    <div id="OrdersInfoDiv" runat="server" visible="false">
        <asp:GridView ID="BatchDetails" Caption="Details of orders ready to be sent" runat="server" AutoGenerateColumns="true" 
        CssClass="InfoTable" AlternatingRowStyle-CssClass="InfoTableAlternateRow" >
        </asp:GridView>
    </div>
    <div id="OrdersSentDiv" class="mainPanel" runat="server" visible="false">
        <h4>Sent Orders</h4>
    </div>
    </form>
    <script src="js/SendOrders.js" type="text/javascript"></script>
</body>
</html>
  • 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-26T12:33:52+00:00Added an answer on May 26, 2026 at 12:33 pm

    If the Label is created inside the UpdateProgress control, then you will need to do something like this

    ((Label)upUpdateProgress.FindControl("lblProgress")).Text = "Uploading File...";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before I begin I'll freely admit it's something in my code but it's not
First of all, before I begin, I am using VC++ 2008 professional, running an
I know there were a couple similar questions, but none solved my problem. This
Before I begin, I would like to highlight the structure of what I am
Just before I begin heres a small overview of what I'm trying to achieve
I'm working on building the URLs for my REST API before I begin writing
In Latex, how do I eliminate the space inserted before itemize? \begin{itemize} % produces
Before I start, I know there is this post and it doesn't answer my
There are several/many questions regarding TFS branching strategy, but I am haven't been able
Consider this situation: Begin transaction Insert 20 records into a table with an auto_increment

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.