event fired on allready selected radiobutton

G

Guest

Hi,

I noticed that when mouse click is done on allready selected radiobutton - a
postback is made !
1. Why such thing happens ?
2. How can I catch this event on server side - it causes undesired side
affects.

Shimon
 
P

P Nishanthan

If the Autopostback property is set to true for the radib butten, this will
happen.
Regards,
P.Nishanthan
 
G

Guest

This solution is not good for me because I do want the check event to occur
if this radiobutton wasn't selected before (I have 2 radiobuttons in the same
group).

Shouldn't there be some specific event that can be caught on server side?

Eliyahu Goldin said:
Shimon,

If you don't want it, catch it on client side and block with a simple
javascript. Try this (c#):

myRadioButton.Attributes["onclick"]="return !this.checked";

Eliyahu

????? ?. said:
Hi,

I noticed that when mouse click is done on allready selected radiobutton - a
postback is made !
1. Why such thing happens ?
2. How can I catch this event on server side - it causes undesired side
affects.

Shimon
 
G

Guest

Any suggestion how I can identify this event on server side
or alternatively - how can I block it on client side?
 
E

Eliyahu Goldin

Shimon,

If you don't want it, catch it on client side and block with a simple
javascript. Try this (c#):

myRadioButton.Attributes["onclick"]="return !this.checked";

Eliyahu
 
E

Eliyahu Goldin

It will occur if this radiobutton wasn't selected before. In this case
!this.checked will return true and the event will proceed.

Eliyahu

????? ?. said:
This solution is not good for me because I do want the check event to occur
if this radiobutton wasn't selected before (I have 2 radiobuttons in the same
group).

Shouldn't there be some specific event that can be caught on server side?

Eliyahu Goldin said:
Shimon,

If you don't want it, catch it on client side and block with a simple
javascript. Try this (c#):

myRadioButton.Attributes["onclick"]="return !this.checked";

Eliyahu

????? ?. said:
Hi,

I noticed that when mouse click is done on allready selected
radiobutton -
a
postback is made !
1. Why such thing happens ?
2. How can I catch this event on server side - it causes undesired side
affects.

Shimon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top