Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Adding Dynamic Radio buttons in panel control

Adding Dynamic Radio buttons in panel control

Scheduled Pinned Locked Moved ASP.NET
javascriptsysadminhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chakran
    wrote on last edited by
    #1

    Hi, I am trying to add dynamic Radio buttons to 4 panel controls in a aspx. one panel control is on top adding dynamic radio buttons of recharge options. remaining panel controls is on below, containig payment options.am adding these options dynamically. but my problem is only one radio button is selected. but i want to select radion button in top panel control and select only one radion button in remainig 3 panels(payment options). pls see the code below. // Recharge Options panel control. Have to select one radio button. private void LoadRechargeOptions() { string strPath = Server.MapPath(CommonUIConstants.LANGUAGE_XML_FILE_FOLDER_NAME) + Path.DirectorySeparatorChar + CommonUIConstants.RECHARGE_OPTIONS; DataSet dsRechargeOptions = UtilityUIFunctions.GetPaymentMethodList(strPath); DataView dvForDisplay = dsRechargeOptions.Tables[0].DefaultView; string strCountryName = GetCountryName(); dvForDisplay.RowFilter = CommonUIConstants.COUNTRYNAME + "='" + strCountryName + "'"; HtmlInputRadioButton rdb = null; Label lbl = null; if (dvForDisplay.Count > 0) { for (int i = 0; i < dvForDisplay.Count; i++) { rdb = new HtmlInputRadioButton(); lbl = new Label(); rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString(); rdb.Value = dvForDisplay[i]["RadioButtonText"].ToString(); lbl.Text = dvForDisplay[i]["RadioButtonText"].ToString(); rdb.Style.Add("border", "0px"); rdb.Attributes.Add("onClick", "javascript:AmountToCharge('" + rdb.Value + "','" + strQuoteCurrency + "');"); panelRechargeOptions.Controls.Add(rdb); panelRechargeOptions.Controls.Add(lbl); } } // Payment options panel controls. here there are 3 panel controls. in these 3 panel controls have to select only one radio button. private void LoadPaymentMethods() { string strPath = Server.MapPath(CommonUIConstants.LANGUAGE_XML_FILE_FOLDER_NAME) + Path.DirectorySeparatorChar + CommonUIConstants.PAYMENT_METHODS; DataSet dsPaymentMethods = UtilityUIFunctions.GetPaymentMethodList(strPath); DataView dvForDisplay = dsPaymentMethods.Tables[0].DefaultView; string strCountryName = GetCountryName(); dvForDisplay.RowFilter = CommonUIConstants.COUNTRYNAME + "='" + strCountryName + "'";

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups