|
Rank: Newbie Groups: Member
Joined: 3/25/2008 Posts: 4
|
Hello, When I added ProgressBar control on my page, the labels stopped working. The following does not work anymore: lblLabel.Text = "test"; or lblLabel.Visible = true; do not work anymore. The labels are just not showing. Does anyone know what could be the problem? Please help. Below is my asp.net/cs code __________________________________________________________________________ <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPage1.aspx.cs" Inherits="_Default" %> <%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %> <!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 runat="server"> <title>Dealership Details</title> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td> <table height="25px" width="100%" cellpadding="1" cellspacing="0"> <tr> <td width="100%"> <eo:ProgressBar ID="ProgressBar1" runat="server" BackgroundImage="00060301" BackgroundImageLeft="00060302" BackgroundImageRight="00060303" ControlSkinID="None" IndicatorImage="~/images/bar.gif" ShowPercentage="True" Width="470px" OnRunTask="OnProgressBarRunTask" Maximum="42" StartTaskButton="btnNext" StopTaskButton="Button1" /> </td> </tr> </table> </td> </tr> <tr> <td> <asp:Button ID="btnNext" runat="server" Text="Click" /><br /> </td> </tr> </table> </div> <asp:Label ID="lblMessage" runat="server" Text="test hello there" Visible="False"></asp:Label> <asp:Label ID="lblMessage2" runat="server"></asp:Label> </form> </body> </html> _______________________________________________________________ protected void Page_Load(object sender, EventArgs e) { }
protected void OnProgressBarRunTask(object sender, EO.Web.ProgressTaskEventArgs e) { lblMessage.Visible = true;//does not work TODO: make this work
lblMessage2.Text = "can you see me?";
int i = 5;
System.Threading.Thread.Sleep(100);
//Update client side progress e.UpdateProgress(i);
}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
|
|
Rank: Newbie Groups: Member
Joined: 3/25/2008 Posts: 4
|
so there is no way to make labels work inside OnProgressBarRunTask functions?
I had to put code in that function because my event handler for button Next do not work anymore since I added that button as a StartTaskButton.
Do you have any suggestions ? My code is below: ____________________________________ protected void OnBtnNextClick(object sender, EventArgs e) { //does not work because it calls OnProgressBarRunTask--had to put code there
}
protected void OnProgressBarRunTask(object sender, EO.Web.ProgressTaskEventArgs e) {
//if not validated, return //otherwise, save to DB
if ( nPanel1Offer == 0 && nPanel2Offer == 0 ) { lblMessage.Visible = true;//does not work TODO: make this work return; }
GetSelectedOptions(); SaveOfferSelection();
//if saving successful, increment nNumberOfStepsCompleted in GetNumberOfStepsCompleted()
int i = GetNumberOfStepsCompleted();
System.Threading.Thread.Sleep(100);
//Update client side progress e.UpdateProgress(i);
UpdateCurrentStep();
//postback to itself Server.Transfer("OfferSelector.aspx");
}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
As already pointed out in the previous post, you will need to rely on the client side code to turn off the label. It also has link to sample code. So please take a look those first.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 3/25/2008 Posts: 4
|
ok thanks
|
|
Rank: Newbie Groups: Member
Joined: 3/25/2008 Posts: 4
|
thanks again for the link -- it was really helpful
|
|