an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > Shipping Option radio button Checked
Last Post 6/17/2009 11:50:40 AM By Bahram. 0 replies.
6/17/2009 11:50:40 AM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Shipping Option radio button Checked
refering to this thread,
 
 
I did this code for radio button checked in when page is opened. 
 
public void AutoSelect()
    {
        base.DataBind();
        pnlEmpty.Visible = false;
        SiteConfigurationSection section = SiteConfigurationSection.GetSection();
        methods = ShippingService.GetShippingMethods(ShippingPackage.GetShippingPackage(Cart.Get(),
            (Address)Session["ShippingAddress"], section.LocationCountry, section.LocationState, section.LocationCity, section.LocationZipcode));
        rptShippingMethods.DataSource = methods;
        rptShippingMethods.DataBind();
        RadioButton rdoShiping = (RadioButton)rptShippingMethods.Items[0].FindControl("rdoShiping");
        rdoShiping.Checked = true;

        Session["ShippingMethod"] = methods[0];
       
    }