Welcome Guest Search | Active Topics | Sign In | Register

labels not showing on the page when using ProgressBar Options
tobrien
Posted: Wednesday, March 26, 2008 8:33:10 AM
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);

}
eo_support
Posted: Wednesday, March 26, 2008 8:51:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
tobrien
Posted: Wednesday, March 26, 2008 8:57:58 AM
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");

}
eo_support
Posted: Wednesday, March 26, 2008 9:01:39 AM
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
tobrien
Posted: Wednesday, March 26, 2008 9:04:23 AM
Rank: Newbie
Groups: Member

Joined: 3/25/2008
Posts: 4
ok thanks
tobrien
Posted: Wednesday, March 26, 2008 9:51:29 AM
Rank: Newbie
Groups: Member

Joined: 3/25/2008
Posts: 4
thanks again for the link -- it was really helpful


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.