Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 05, 2012 05:11 AM by siamand
Feb 22, 2012 11:15 AM|LINK
i found a poll control on this sit : obout.com , now i want to use it instead of my voting system in my website ...
my voting system is like below :
1- stored procedure to get the active vote :
ALTER PROCEDURE GetActiveVote
Select VoteID, VoteQues From tblvoteQuestion Where IsActive='True'
another stored procedure to get Answers :
ALTER PROCEDURE GetVoteChoices
Select ChoicesID, Choices from tblVoteChoices
VoteID = @VoteID
and the code behind the page is like below :
public partial class Vote : UserDataAccess
protected void Page_Load(object sender, EventArgs e)
// if its fresh page , get the Active vote
DataTable dt = DA.GetActiveVote();
// if there is Active vote , bring it if not hide the vote table
if (dt.Rows.Count > 0)
lblVoteQuestion.Text = dt.Rows["VoteQues"].ToString();
rdoLstChoices.DataSource = DA.GetVoteChoices(dt.Rows["VoteID"].ToString());
// after get questin and answer connect the btn valu to vote it
// after user voting, it will save in cookies , so we have to check the cookies if ther is voteid ,
// if there is recor in the cookies for the voteid then disable lnkbtnVote and rdoLstVotechoice to prevent people to vote
if (Request.Cookies["VoteID"] != null && Request.Cookies["VoteID"].Value.Equals(lnkBtnVote.Attributes["VoteID"]))
// agar la kooki mawjwd bw awa lnkbtnvote u rdoLstvotechoice disable bka
rdoLstChoices.Enabled = lnkBtnVote.Enabled = false;
//if there is no active vote hid tblvote
tblVote.Visible = false;
protected void lnkBtnVote_Click(object sender, EventArgs e)
// write the cookie
// retrive the cookie
Request.Cookies["VoteID"].Expires = DateTime.Now.AddDays(2);
so now how i implete the Poll control from obout.com website useing my concept ...
Feb 22, 2012 11:22 AM|LINK
Your backend stuff looks good but could you post your aspx page just so we can see what you have in the visual elements?
Feb 22, 2012 11:35 AM|LINK
thanks for you quick reply ,,
i have a webuser control for this purpose ...
<table cellpadding="0" cellspacing="0" class="style1" runat="server" id="tblVote">
<asp:Label ID="lblVoteQuestion" runat="server" ForeColor="Red"></asp:Label>
<asp:RadioButtonList ID="rdoLstChoices" runat="server" DataTextField="Choices"
<asp:LinkButton ID="lnkBtnVote" runat="server" onclick="lnkBtnVote_Click">Vote</asp:LinkButton>
<asp:HyperLink ID="hypVoteResult" runat="server">Vote Result</asp:HyperLink>
but what i want to do is using obout poll control instead of my simple controls...
Feb 22, 2012 11:46 AM|LINK
From the link you provided, it looks like they are willing to allow download of their control. Did you grab it from their site?
Feb 22, 2012 11:47 AM|LINK
It would appear that they allow downloading of their entire suite of controls here:
Feb 22, 2012 11:55 AM|LINK
yes i downloaded it ,and i put it to my project .. but dont know how to make this control to get data from my code ...
im biggener ..
Feb 22, 2012 12:19 PM|LINK
Alright, it looks like you may not be properly referencing it in the top of your page. Give me a littie time to turn around something for you...
Feb 22, 2012 12:27 PM|LINK
thank you very much for your help ,
i will wait , its not problem if you provide a nother poll system which is suitable with my code and nice looking ...
Feb 22, 2012 12:48 PM|LINK
Ok, what you need to do here is opne the folder, and double-click RunExamples.exe Then click Install controls into Visual Studio toolbox. Once installed, you should be able to get access to the poll control.
Feb 22, 2012 01:11 PM|LINK
If the controls don't appear automaticially in your VS toolbar, right-click and add a Tab under the toolbox. Right-click on the newly added tab and click Choose Items. Under .NET Framework Components, click Browse, Browse your system to the oBout folder
and open BIN, then select Obout.Ajax.UI.dll. You may continue to add the controls under the obout tab you created. This will make them available in Visual Studio. I think something is wrong with their installation routine.