473,378 Members | 1,397 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,378 software developers and data experts.

event fired on allready selected radiobutton

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
Nov 19 '05 #1
5 1170
If the Autopostback property is set to true for the radib butten, this will
happen.
Regards,
P.Nishanthan
"????? ?." <@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
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

Nov 19 '05 #2
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

"????? ?." <@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
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

Nov 19 '05 #3
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" wrote:
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

"????? ?." <@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
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


Nov 19 '05 #4
Any suggestion how I can identify this event on server side
or alternatively - how can I block it on client side?

"P Nishanthan" wrote:
If the Autopostback property is set to true for the radib butten, this will
happen.
Regards,
P.Nishanthan
"????? ?." <@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
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


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

Eliyahu

"????? ?." <@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
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" wrote:
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

"????? ?." <@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
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


Nov 19 '05 #6

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

Similar topics

3
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
1
by: Empire City | last post by:
I have an ASP.NET form with a DataGrid and Button. I want to put a RadioButtonList in a DataGrid cell. I bind it to an ArrayList which has a ListItem in the cell. The display part works fine. I...
2
by: gce | last post by:
Allthough button2 created with the designer works 100%. The button I created (inside the table) with dim button1 as new button doesn't give me a click event. Please help. Public Class WebForm8 ...
2
by: Amelyan | last post by:
I *finally* narrowed down my problem to my custom web control. If I hookup event inside dynamically created custom web control, it doesn't get fired. However, event gets fired for any other...
1
by: e | last post by:
I have an ownerdrawn listbox that paints items in various colors dependant upon whether or not it has focus, selected, etc. The code that physically paints the items is in the drawItem event, and...
3
by: LCAdeveloper | last post by:
Help! A trawl through the archives couldn't shed any light on this, so is there a way to handle DoubleClick events for RadioButtons in vb.NET? I'm recoding a VB4 application, which used the...
2
by: glenn | last post by:
Hi folks, I am trying to determine which item in a DropDownList Web control has been selected. I have posted an OnSelectedIndexChanged subroutine in my code with a reference to the subroutine...
3
by: Andreas Wöckl | last post by:
HI Group! I have to programmatically create a user input form with various Checkbox and RadioButton lists - Beside every List I have to place an image button that is able to reset the...
2
by: Mufasa | last post by:
How can I make an asp:radiobutton where when the user selects it it runs javascript code? I've tried doing the following but it doesn't seem to work: ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.