Karthik Malla
Karthik Malla

Reputation: 5800

Click event for radio button

how to write action for when an ASP.NET/C# radio button check was changed? I need a pop up to be opened when radio button is clicked on.

Upvotes: 0

Views: 16712

Answers (3)

Oleg Grishko
Oleg Grishko

Reputation: 4281

I will recommend using jQuery.

$(function(){
   $("input:radio").change(function(){
       var selectdValue = $("input:radio:checked").val();
       window.open("myPopup.aspx?val=" + selectdValue ,"myPopup");
   });
});

Upvotes: 3

MLS
MLS

Reputation: 895

you will have to bind javascript's popup with radiobuttons in itemdatabound/rowdatabound events. alternatively u can use jquery. using jquery it's easy, just explore that

Upvotes: 1

thevan
thevan

Reputation: 10344

Place the Condition on the OnCheckedChanged Event:

   if(radiobutton.Checked)
   {
      // Place your code for POPUP
      mpeQCAttribute.Show();           // mpeQCAttribute is the ModalPopupExtender
   }

Upvotes: 3

Related Questions