Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've multiple radio button, on selected radio I've form with save button. I done all thing with radio button runat="server" tag. all thing is fine but i want it with javascript or jquery, when i remove runat="server" tag from radio button, its working fine but in the form save button click recheck radio button by default 1st radio..

how do i prevent rechecking radio button from code behind without using runat="server" tag on radio
Posted
Comments
[no name] 25-Oct-14 10:32am    
Have you used form.serialize?? for the save call ?
vijayadav 27-Oct-14 3:18am    
HI Please clear your question......
shehzad82 27-Oct-14 6:29am    
I'm unfamiliar with serialize
shehzad82 27-Oct-14 6:36am    
vijayadav : I'm controlling tabs with radio button on one page, I'd done all things with code behind with runat server tag on radios, but its a little bit slow, when i remove runat server tag from radio its fine and im able to chose desire radio, but e.g. when on specific radio i show a textboxes and buttons like save/submit when i press save button it do its funcationality and reselect 1st radio which has checked="checked" property in aspx file, I want its functionality but doesn't recheck radio, mean stay on same tab..

1 solution

This is because when page loads again, all controls will reset. You have to store the value somewhere, either in ViewState or Session or Database. Then when page loads again, you need to set the control value accordingly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900