Welcome Guest Search | Active Topics | Sign In | Register

Unable to get the msgbox to display. Options
Kevin Jones
Posted: Friday, November 12, 2010 12:32:33 PM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
I added the msgbox to two pages in my project a few months ago and they work. I tried adding it to a third page and it will not display. The code runs and but nothing happens. What am I missing?

I have checked everything I can think of:

The HTML:

<asp:Content ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>
<uc:msgbox ID="MsgBox" runat="server" />
<div id="ContentHeader">
<table>

The C# code:

protected void ButtonLogin_Click(object sender, EventArgs e)
{
String errorMessage = VerifyLoginInformation(true);

if (errorMessage.Length > 0)
{
LabelLoginError.Text = errorMessage;
PlaceHolderDefaultLoginMessage.Visible = false;
PlaceHolderErrorLoginMessage.Visible = true;
MsgBox.Show("Login", "An error occurred.");
return;
}


The control code:

public partial class MessageBoxControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}

public void Show(
String title,
String message
)
{
message = message.Replace(Environment.NewLine, "<br>");
MsgBox.Show(title, message, null, new EO.Web.MsgBoxButton(" OK "));
}
}

The web.config file:

<compilation debug="true">
<assemblies>
<add assembly="EO.Web, Version=7.0.41.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc"></add>

<pages>
<controls>
<add assembly="EO.Web, Version=7.0.41.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc" namespace="EO.Web" tagPrefix="eo" />
eo_support
Posted: Friday, November 12, 2010 2:02:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your code looks fine to us. If you continue to have problem, please try to isolate the problem into an independent test project/page and send to us. We will be happy to take a look as soon as we have that.

Thanks!
Kevin Jones
Posted: Friday, November 12, 2010 2:38:39 PM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
I figured it out. The HTML line:

<uc:msgbox ID="MsgBox" runat="server" />

Has to go inside the asp:UpdatePanel if there is one.


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.