Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8004185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:50:59+00:00 2026-06-04T16:50:59+00:00

Firefox is causing a few problems for me at the moment and I can’t

  • 0

Firefox is causing a few problems for me at the moment and I can’t quite figure them out.

I have two listboxes, one is populated when the page is loaded, and the other when an item from the first is selected then click view button. The problem I am having is the 2nd listbox populates for just a split second and then everything is deleted. The function works in all other browsers I have tested.. IE, Chrome, and Safari..

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Data;
using System.Data.SqlClient;
using DAL;

namespace ACESAdmin2.AcesSetup
{
public partial class storefront : System.Web.UI.Page
{
    private string selectedCustomer
    {
        get { return Session["selectedCustomer"] != null ? (string)Session["selectedCustomer"] : string.Empty; }
        set { Session["selectedCustomer"] = value; }
    }
    private string selectedCatalog
    {
        get { return Session["selectedCatalog"] != null ? (string)Session["selectedCatalog"] : string.Empty; }
        set { Session["selectedCatalog"] = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
            if (!IsPostBack)
        {
            LoadPage();
        }
    }

    private void LoadPage()
    {

        initControls();

        #region role setting
        try
        {
            //check user role to determine editing rights
            string usersRole = Roles.GetRolesForUser(Membership.GetUser().UserName)[0];
            MembershipUser user = Membership.GetUser();
            switch (usersRole)
            {
                case "BasicUser":
                    AlignTextNoneRadio.Enabled = false;
                    AlignTextLeftRadio.Enabled = false;
                    AlignRightRadio.Enabled = false;
                    AlignCenterRadio.Enabled = false;
                    headerText.Enabled = false;
                    returnPolicy.Enabled = false;
                    welcomeMessageTextBox.Enabled = false;
                    homeText.Enabled = false;
                    homeLink.Enabled = false;
                    updateStoreButton.Enabled = false;
                    break;

                case "Customer":
                    homeLink.Enabled = false;
                    homeText.Enabled = false;
                    break;

                case "SalesRep":
                case "Admin":
                case "SuperAdmin":
                    break;
                default:
                    break;
            }
        }

        catch (NullReferenceException error)
        {
            string message;
            message = error.ToString();
            Response.Redirect("../error.aspx");
        }
        #endregion

        #region Accordion Pane Settings

        if (ViewState["SelectedAccordionIndex"] == null)
        {
            MyAccordion.SelectedIndex = -1;
        }
        else
        {
            MyAccordion.SelectedIndex = (int)ViewState["SelectedAccordionIndex"];
        }
        #endregion
    }
    private void initControls()
    {
        //Viewable to all
        #region customer label
        if (selectedCustomer != null)
        {
            string customerName = DAL.Util.getCustomerName().ToString();
            if (customerName != null || customerName != String.Empty)
            {
                lblCustomer.Text = "Customer: <font color=maroon>" + customerName + "</font>";
                lblCustomer.Visible = true;
            }
            else
            {
                lblCustomer.Text = "Customer: <font color=maroon>" + selectedCustomer.ToString() + "</font>";
                lblCustomer.Visible = true;
            }
        }
        #endregion

        //Edit Store Front
        #region Populate Fields

        #region headerAlign

        string headerAlign = DAL.Util.getHeaderAlign().ToString();
        switch (headerAlign)
        {
            case "left":
                AlignTextLeftRadio.Checked = true;
                break;
            case "center":
                AlignCenterRadio.Checked = true;
                break;
            case "right":
                AlignRightRadio.Checked = true;
                break;
            default:
                AlignTextNoneRadio.Checked = true;
                break;
        }
        #endregion

        welcomeMessageTextBox.Text = DAL.Util.getWelcome().ToString();
        headerText.Text = DAL.Util.getHeaderText().ToString();
        returnPolicy.Text = DAL.Util.getReturn().ToString();
        homeLink.Text = DAL.Util.getHomeLink().ToString();
        homeText.Text = DAL.Util.getHomeText().ToString();
        #endregion

        //BJIT Setup
        #region popultae fields
        ddlSelectVendor.DataSource = DAL.Util.getVendors();
        ddlSelectVendor.DataBind();
        listCatalogs.DataSource = DAL.Util.getCatalogs();
        listCatalogs.DataBind();
        #endregion

    }

    protected void returnButton_Click(object sender, EventArgs e)
    {
        //Takes user back to main admin page
        Response.Redirect("../Admin/mainAdmin.aspx");
    }

    protected void dropdownlist_SelectedInexChange(object sender, EventArgs e)
    {
        ViewState["SelectedAccordionIndex"] = MyAccordion.SelectedIndex;
    }

    protected void updateStoreButton_Click(object sender, EventArgs e)
    {
        switch(MyAccordion.SelectedIndex)
        {
            case 0:
            #region Header Value
            string selectedHeaderAlign = null;
            foreach (Control control in this.RadioPanel.Controls)
            {
                if (control is RadioButton)
                {
                    RadioButton radio = control as RadioButton;
                    if (radio.Checked)
                    {
                        selectedHeaderAlign = radio.Text.ToLower();
                    }
                }
            }
            #endregion
            //updates customer information in the table
            string sqlSf = "Update Store SET HeaderAlign = @HeaderAlign, HeaderText=@HeaderText, ReturnPolicy=@ReturnPolicy, WelcomeMessage=@WelcomeMessage, HomeTextLink=@HomeTextLink, HomeLink=@HomeLink"
                + " WHERE CustomerID='" + HttpContext.Current.Session["selectedCustomer"].ToString() + "'";
            //setting parameters
            #region Parameter Values
            AdoUtil.ACESSQLParameterCollection parameters = new AdoUtil.ACESSQLParameterCollection();
            AdoUtil.ACESSQLParameter param = new AdoUtil.ACESSQLParameter();



            param.ParamName = "@HeaderAlign";
            param.ParamValue = selectedHeaderAlign.ToString();
            param.ParamDBType = SqlDbType.VarChar;
            parameters.Add(param);

            param = new AdoUtil.ACESSQLParameter();
            param.ParamName = "@HeaderText";
            param.ParamValue = headerText.Text.ToString();
            param.ParamDBType = SqlDbType.VarChar;
            parameters.Add(param);

            param = new AdoUtil.ACESSQLParameter();
            param.ParamName = "@ReturnPolicy";
            param.ParamValue = returnPolicy.Text.ToString();
            param.ParamDBType = SqlDbType.VarChar;
            parameters.Add(param);

            param = new AdoUtil.ACESSQLParameter();
            param.ParamName = "@WelcomeMessage";
            param.ParamValue = welcomeMessageTextBox.Text.ToString();
            param.ParamDBType = SqlDbType.VarChar;
            parameters.Add(param);

            param = new AdoUtil.ACESSQLParameter();
            param.ParamName = "@HomeTextLink";
            param.ParamValue = homeText.Text.ToString();
            param.ParamDBType = SqlDbType.VarChar;
            parameters.Add(param);

            param = new AdoUtil.ACESSQLParameter();
            param.ParamName = "@HomeLink";
            param.ParamValue = homeLink.Text.ToString();
            param.ParamDBType = SqlDbType.VarChar;
            parameters.Add(param);
            #endregion
            AdoUtil.ExecuteNonQuery(sqlSf, parameters);
            break;
            case 1:
                //BJIT Updates
            string sqlBJIT = "Update";
            break;

            default:
            break;

        }
        MyAccordion.SelectedIndex = -1;
    }

    #region BJIT Control Events
    //BJIT Button
    protected void btnAddCustomer_Click(object sender, EventArgs e)
    {
        if (listItems.SelectedIndex != -1)
        {
            ArrayList removeArr = new ArrayList();

            listItemProfiles.SelectedIndex = -1;

            //Copy selected items to listItemProfiles
            foreach (ListItem li in listItems.Items)
            {
                if (li.Selected)
                {
                    listItemProfiles.Items.Add(li);
                    removeArr.Add(li);
                }
            }

            //Remove the selected items from listItems
            foreach (ListItem li in removeArr)
            {
                listItems.Items.Remove(li);
            }
            Util.WebFunctions.SortListBox(listItemProfiles);
        }
    }

    //BJIT Button
    protected void btnRemoveCustomer_Click(object sender, EventArgs e)
    {
        if (listItemProfiles.SelectedIndex != -1)
        {
            ArrayList removeArr = new ArrayList();
            listItems.SelectedIndex = -1;

            //Copy selected items to listItems
            foreach (ListItem li in listItemProfiles.Items)
            {
                if (li.Selected)
                {
                    li.Selected = false;
                    listItems.Items.Add(li);
                    removeArr.Add(li);
                }
            }

            //Remove the selected items from listItemProfiles
            foreach (ListItem li in removeArr)
            {
                listItemProfiles.Items.Remove(li);
            }
            Util.WebFunctions.SortListBox(listItems);
        }
    }

    //BJIT Button
    protected void viewBtn_Click(object sender, EventArgs e)
    {
        if (listCatalogs.SelectedItem != null)
        {
            listItemCatalogs.DataSource = DAL.Util.getCatalogProfile(listCatalogs.SelectedValue.ToString());
            listItemCatalogs.DataBind();                
        }
    }

    //BJIT Button
    protected void editBtn_Click(object sender, EventArgs e)
    {
        if (listCatalogs.SelectedItem != null)
        {
            #region controls visible
            lblVendor.Visible = true;
            ddlSelectVendor.Visible = true;
            lblItemProfile.Visible = true;
            lblItems.Visible = true;
            listItems.Visible = true;
            listItemProfiles.Visible = true;
            btnAddCustomer.Visible = true;
            btnRemoveCustomer.Visible = true;

            lblItemsCatalog.Visible = false;
            listItemCatalogs.Visible = false;
            //listItemCatalogs.Items.Clear();
            #endregion

            #region disable controls
            //listCatalogs.Enabled = false;
            listItemCatalogs.Enabled = false;
            editBtn.Enabled = false;
            viewBtn.Enabled = false;
            #endregion

            listItemProfiles.DataSource = DAL.Util.getCatalogProfile(listCatalogs.SelectedValue.ToString());
            listItemProfiles.DataBind();

        }
    }

    //BJIT Drop Down List
    protected void ddlSelectVendor_Changed(object sender, EventArgs e)
    {
        listItems.DataSource = DAL.Util.getVenorItems(ddlSelectVendor.SelectedItem.ToString());
        listItems.DataBind();
    }
    #endregion
  }
}

With this there is a little more functionality that was not described previously and with this Firefox also does not keep the data / keep the controls visible when the editBtn_Click is initiated.

And again if there is anything i can clear up I will do my best to reword or anything.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:51:00+00:00Added an answer on June 4, 2026 at 4:51 pm

    I don’t exactly know what happened, but it is working now. I rebuilt the .cs page and recompiled the whole site and everything works. Also cleared the cache of all browsers..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html/css that is causing problems in Firefox 1.5 and 2,
I can't figure out whats causing the slider on this site to overlay over
I have noticed that my application is causing a substantial memory leak in firefox
Edit: After addressing some issues that may or may not have been causing problems,
I've been racking my brain trying to figure this one out as it's been
I have the following html: <article class=layer id=one> </article> <article class=layer id=two> </article> <article
I have a script , which has been causing me quite some issue today.
Firefox 3 came with a new allocator: jemalloc . I have heard at several
I am trying to work out some performance problems with some JavaScript I've been
I recently encountered a printing issue in Firefox that eventually turned out to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.