Greetings,
Thanks for the codes, but it is throwing the same exceptions as mine. It will not compile and throws same exceptions as mine, see attached.
The attached exception is thrown when I login as admin and click on the Web Parts to lunch the Parts catalog.
Yes, I did recompile the application after I created the codes, but it still throws same exceptions.
Thanks for the clarifications on how to post codes on your forum.
Cheers,
yousaid
Using YOUR codes here is what I have but it will NOT compile
Code behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MonoSoftware.MonoX.ModuleGallery
{
public partial class SitePoll : MonoSoftware.MonoX.ModuleGallery.MonoXPollModule
{
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
plhLinkButtons.Visible = false;
btnShowVotePanel.Visible = false;
btnVote1.Text = this.VoteButtonText;
btnResults1.Text = this.ResultsButtonText;
btnShowVotePanel1.Text = this.VoteButtonText;
}
}
}
MarkUp
------------
<%@ Control Language="C#"
AutoEventWireup="true"
CodeBehind="SitePoll.ascx.cs"
Inherits="MonoSoftware.MonoX.ModuleGallery.SitePoll"
%>
<%@ Register TagPrefix="MonoX" TagName="StyledButton" Src="/MonoX/controls/StyledButton.ascx" %>
<asp:Panel runat="server" ID="pnlContainer">
<div class="poll">
<div class="poll-question"><asp:Label runat="server" ID="lblQuestion"></asp:Label></div>
<asp:Panel runat="server" ID="pnlInput">
<asp:RadioButtonList runat="server" ID="rblAnswers">
</asp:RadioButtonList>
<div style="margin-top: 10px;">
<asp:PlaceHolder ID="plhLinkButtons" runat="server" Visible="false">
<asp:LinkButton runat="server" ID="btnVote" OnClick="btnVote_Click" /> |
<asp:LinkButton runat="server" ID="btnResults" OnClick="btnResults_Click" />
</asp:PlaceHolder>
<MonoX:StyledButton ID="btnVote1" runat="server" OnClick="btnVote_Click" />
<MonoX:StyledButton ID="btnResults1" runat="server" OnClick="btnResults_Click" />
</div>
</asp:Panel>
<asp:Panel runat="server" ID="pnlGraph" Width="100%">
<asp:Repeater runat="server" ID="rptGraph">
<ItemTemplate>
<asp:Label runat="server" ID="lblAnswer" Text='<%# GetAnswerText(Eval("Answer").ToString(), int.Parse(Eval("Votes").ToString())) %>'></asp:Label><br />
<asp:Panel runat="server" ID="pnlWidth" BackColor='<%# GetColor(Eval("Color").ToString()) %>' Width='<%# GetWidth(Eval("Votes").ToString()) %>' Height="15px" CssClass='<%# GetColor(Eval("Color").ToString()).Equals(System.Drawing.Color.Empty) ? "poll-bg-color" : String.Empty %>'></asp:Panel>
</ItemTemplate>
<SeparatorTemplate>
<div class="separator">
</div>
</SeparatorTemplate>
</asp:Repeater>
<div style="margin-top: 10px; font-weight: bold;"><asp:Label runat="server" ID="lblTotal"></asp:Label></div>
<asp:LinkButton runat="server" ID="btnShowVotePanel" OnClick="btnShowVotePanel_Click" />
<MonoX:StyledButton ID="btnShowVotePanel1" runat="server" OnClick="btnShowVotePanel_Click" />
</asp:Panel>
</div>
</asp:Panel>