473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Thumbs Up/ Down postback event

I am trying to implement a "thumbs up- down" scoring system- I have an
asp: repeater control to spit to my page a series of unique data eg
John Yay- 2 Nay 10
Lucy Yay- 5 Nay 12
Susie Yay- 25 Nay 3
Each of which has a unique id in my sql database. I have a thumbs up
and thumbs down icon and a current number as shown above. As in
www.urbandictionary.com I would like the number to update immediately
the user clicks the icon- no problem- javascript- the question is...
how do I collect the scoring info to update the sql db- the client
need not update at all for the session- worse posting back everytime
the user clicks yay or nay-. I have considered creating a hidden asp
text box which gathers unique id of eg John, Lucy and -1, or +1 - at
the server this can be used to update the db- BUT WHEN does it get
posted to the server and how is this achieved- what event should fire
this post and can it be done without disrupting the user experience. A
simple example would be lovely if anyone has one.

Dan

Aug 31 '07 #1
4 3087
Hi,

with the ASP.NET AJAX Extensions this is a piece of cake. Put everything
into an UpdatePanel, create 2 button click events thumbs up and thumbs down
and execute the SQL stuff there.

hth

Andreas
--
More on ASP.NET and Silverlight on my blog: http://www.andreas-kraus.net/blog
"DanWeaver" wrote:
I am trying to implement a "thumbs up- down" scoring system- I have an
asp: repeater control to spit to my page a series of unique data eg
John Yay- 2 Nay 10
Lucy Yay- 5 Nay 12
Susie Yay- 25 Nay 3
Each of which has a unique id in my sql database. I have a thumbs up
and thumbs down icon and a current number as shown above. As in
www.urbandictionary.com I would like the number to update immediately
the user clicks the icon- no problem- javascript- the question is...
how do I collect the scoring info to update the sql db- the client
need not update at all for the session- worse posting back everytime
the user clicks yay or nay-. I have considered creating a hidden asp
text box which gathers unique id of eg John, Lucy and -1, or +1 - at
the server this can be used to update the db- BUT WHEN does it get
posted to the server and how is this achieved- what event should fire
this post and can it be done without disrupting the user experience. A
simple example would be lovely if anyone has one.

Dan

Aug 31 '07 #2
Thanks Andreas,

I thought about using an update panel- but using this the users page
is updated every time the user thumbs up/ down- perhaps 25 postbacks -
x Y users- a lot of unneccessary postbacks considering the users page
doesnt need to be updated at all- does anyone know how www.urbandictionary.com
does it? Maybe I am misunderstanding update panel and I could just
rally all thumbs up/down information along with the id of the repeater
element they referred to and do one update per session- but in this
case what event would fire the postback (I dont really want the user
to be forced to "submit" their votes).


On 31 Aug, 22:46, Andreas Kraus
<AndreasKr...@discussions.microsoft.comwrote:
Hi,

with the ASP.NET AJAX Extensions this is a piece of cake. Put everything
into an UpdatePanel, create 2 button click events thumbs up and thumbs down
and execute the SQL stuff there.

hth

Andreas
--
More on ASP.NET and Silverlight on my blog:http://www.andreas-kraus.net/blog

"DanWeaver" wrote:
I am trying to implement a "thumbs up- down" scoring system- I have an
asp: repeater control to spit to my page a series of unique data eg
John Yay- 2 Nay 10
Lucy Yay- 5 Nay 12
Susie Yay- 25 Nay 3
Each of which has a unique id in my sql database. I have a thumbs up
and thumbs down icon and a current number as shown above. As in
www.urbandictionary.comI would like the number to update immediately
the user clicks the icon- no problem- javascript- the question is...
how do I collect the scoring info to update the sql db- the client
need not update at all for the session- worse posting back everytime
the user clicks yay or nay-. I have considered creating a hidden asp
text box which gathers unique id of eg John, Lucy and -1, or +1 - at
the server this can be used to update the db- BUT WHEN does it get
posted to the server and how is this achieved- what event should fire
this post and can it be done without disrupting the user experience. A
simple example would be lovely if anyone has one.
Dan

Sep 1 '07 #3
Hi Dan,

sorry, maybe I missunderstood you. Could you maybe show us some code?

If you just put the Thumbs Up and Thumbs Down Icons including the count in
the UpdatePanel, just that little section is being updated on a Postback, at
least for the User, the Server executes the whole process.

Best Regards,
Andreas
--
More on ASP.NET and Silverlight on my blog: http://www.andreas-kraus.net/blog

>
Sep 1 '07 #4

"DanWeaver" <da*********@googlemail.comwrote in message
news:11**********************@o80g2000hse.googlegr oups.com...
Thanks Andreas,

I thought about using an update panel- but using this the users page
is updated every time the user thumbs up/ down- perhaps 25 postbacks -
x Y users- a lot of unneccessary postbacks considering the users page
doesnt need to be updated at all- does anyone know how
www.urbandictionary.com
does it? Maybe I am misunderstanding update panel and I could just
rally all thumbs up/down information along with the id of the repeater
element they referred to and do one update per session- but in this
case what event would fire the postback (I dont really want the user
to be forced to "submit" their votes).


On 31 Aug, 22:46, Andreas Kraus
<AndreasKr...@discussions.microsoft.comwrote:
>Hi,

with the ASP.NET AJAX Extensions this is a piece of cake. Put everything
into an UpdatePanel, create 2 button click events thumbs up and thumbs
down
and execute the SQL stuff there.

hth

Andreas
--
More on ASP.NET and Silverlight on my
blog:http://www.andreas-kraus.net/blog

"DanWeaver" wrote:
I am trying to implement a "thumbs up- down" scoring system- I have an
asp: repeater control to spit to my page a series of unique data eg
John Yay- 2 Nay 10
Lucy Yay- 5 Nay 12
Susie Yay- 25 Nay 3
Each of which has a unique id in my sql database. I have a thumbs up
and thumbs down icon and a current number as shown above. As in
www.urbandictionary.comI would like the number to update immediately
the user clicks the icon- no problem- javascript- the question is...
how do I collect the scoring info to update the sql db- the client
need not update at all for the session- worse posting back everytime
the user clicks yay or nay-. I have considered creating a hidden asp
text box which gathers unique id of eg John, Lucy and -1, or +1 - at
the server this can be used to update the db- BUT WHEN does it get
posted to the server and how is this achieved- what event should fire
this post and can it be done without disrupting the user experience. A
simple example would be lovely if anyone has one.
Dan

Well after waiting 20 mins to see if the site you mentioned would actually
show me something other than the header, I gave up. I will leave IE on and
see if after a couple of days it works.
Sep 1 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: peterson | last post by:
I have outputcached a page having postback event (onlick). Once it cached I tried to click onClick Event button but since it's cached it won't work. Why any idea?
1
by: Raj | last post by:
Hi, I have a Web form on which there are two Radio buttons, AutoPostBack Property for both is set to true. Also there is a Javascript function attached to each of these radio button. The...
4
by: Mark Lingen | last post by:
I've found a problem with postback event handling and webcontrol buttons. Try out the following code in an ASP.Net project and you will see. Create a web project in VB.Net and drop this code...
0
by: Cool | last post by:
Dear all I am writing a time sheet application in ASP.NET. I have inherited DataGrid control to make a CalendarGrid in which I'm adding columns dynamically based on user request. the porblem is...
10
by: william | last post by:
Hi, I have a datagrid, inside there is a templete item, it's button. I want to do some thing when user click the button, but do not want the postback event happens. How can I do it? Thanks. ...
4
by: Arvind P Rangan | last post by:
Hi, Has anybody worked on disabling postback event of button event in webforms. As it does not have a property of autopostback how do we make it disable. I tried few article but they have...
0
by: Achim Domma (SyynX Solutions GmbH) | last post by:
Hi, in my application I suddenly get the error: "An error has occurred because a control with auto-generated id 'main:institutionManagement:institutionOverview' could not be located to raise...
4
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. If an ASP.NET page postsback, for example, after a button is clicked, and then I refresh the page (ie, by pressing F5 key), why does the same event occur when I press F5 as it did when I...
0
by: =?Utf-8?B?bGl1eGluZmVpaHU=?= | last post by:
Hi, I use post way realization page postback this am must,How realizesunder the post way controls postback continuously to be unable to findthe solution the method to hope can obtain master's help...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.