Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear All,


when I wanted to automatic refresh page that time i putted a line as below

Response.AppendHeader("Refresh", "30");

in my page Load event.
but now I don't want to refresh page so that i comment that line
but still my page getting postback after specific time.

so please tell me what can i do for this


thanks...
Posted

Did you republish your website?
Did you put another AppendHeader in there?

Sorry, but with that little information, we can only guess.
 
Share this answer
 
thanks for response

dear sir


this is my code

protected void Page_Load(object sender, EventArgs e)
    {

        try
        {


//Response.AppendHeader("Refresh", "30");

            hdShowWeather.Value = "False";
            _vpath = UtilityLibrary.Helper.GetVirtualPath();
            //dvDuplicateEmailMessage.Visible = false;
            lblNoOffer.Visible = false;
            ((HtmlAnchor)(Master.FindControl("aHome"))).Attributes.Add("class", "top_menu_active");
            ((HtmlAnchor)(Master.FindControl("aHome"))).HRef = "#";
            ((TextBox)Master.FindControl("txtUsrNm")).Focus();
            m_UserDetails = m_CookieInfo.Split(';');

            //Added by Amol to Show Friends list on Home page starts
            if (!string.IsNullOrEmpty(m_CookieInfo))
            {
                m_LoginUserID = Convert.ToInt32(m_UserDetails[1]);
                m_QueryUserID = Convert.ToInt32(Request.QueryString.Get("ProfileID"));
                ShowLinks();
                AssignLinks();
                SetControlAttrib_NetworkList();

            }
            //Added by Amol to Show Friends list on Home page ends

            if (!IsPostBack)
            {
                ImageGalleryHandler images = new ImageGalleryHandler();
                dtlstImages.DataSource = images.LoadHomePageImagesList<IDataReader>();
                dtlstImages.DataBind();
                UserInfoHandler m_UserInfoHandler = new UserInfoHandler();
                DlstLatestMember.DataSource = m_UserInfoHandler.FetchLatestMember<IDataReader>();
                DlstLatestMember.DataBind();
                // m_userId = (HttpContext.Current.User.Identity.Name.Split(';')[1]);   
                //divIndName.Visible = true;
                //divOrgName.Visible = false;


            }
            if (string.IsNullOrEmpty(m_CookieInfo))
            {
                pnl_Home.Visible = true;
                pnl_MyHome.Visible = false;
                aWeatherLogo.HRef = "http://www.weather.com";
                //tdFriends.Visible = false;
            }
            else
            {
                m_LoginUserID = Convert.ToInt32(HttpContext.Current.User.Identity.Name.Split(';')[1]);
                pnl_MyHome.Visible = true;
                pnl_Home.Visible = false;
                //Added by manoj to remove log4.txt error
                //if (m_LoginUserID != null)
                //{
                AssignProfileValues(m_LoginUserID);
                //}

                PersonalInfoHandler prsnl = new PersonalInfoHandler();
                if (!String.IsNullOrEmpty(stationId))
                {
                    weatherCode = prsnl.WeatherStationCode(stationId);
                    aWeatherLogo.HRef = "http://www.weather.com/weather/today/" + weatherCode;
                }

                //aUserImage.HRef = String.Concat(_vpath, Helper.GetValue(Constants.APPKEYS.VIEWPROFILE), "?ProfileID=", m_LoginUserID);
                //Added by manoj for notifiation

                if (!IsPostBack)
                {
                    LoadAlertData();
                    GetAllCountries();
                    GetAllWeatherStationsByCountry(int.Parse(drpdwnlstcountry.SelectedValue));

                    if (!string.IsNullOrEmpty(m_LoginUserID.ToString()) && m_LoginUserID != 0)
                    {
                        fillNotificationData();

                        aImportContacts.HRef = String.Concat(_vpath, Helper.GetValue(Constants.APPKEYS.INVITEFRIENDS), "?ProfileID=", m_LoginUserID);
                        aImgImportContacts.HRef = String.Concat(_vpath, Helper.GetValue(Constants.APPKEYS.INVITEFRIENDS), "?ProfileID=", m_LoginUserID);
                        aInviteFriends.HRef = string.Concat(_vpath, "/Invite/Invite.aspx", "?ProfileID=", m_LoginUserID);
                        aImgInviteFriends.HRef = string.Concat(_vpath, "/Invite/Invite.aspx", "?ProfileID=", m_LoginUserID);
                    }
                }
            }
            if (!string.IsNullOrEmpty(m_CookieInfo))
            {
                SetControlAttrib_ContactList();
            }
        }

        catch (Exception ex)
        { ((HtmlTableCell)(Master.FindControl("tdError"))).InnerText = m_ExcHndlr.HandleException(ex); }


    }





and now i have removed that commented line from my code but still getting post back
 
Share this answer
 
Comments
avigodse 9-Apr-11 9:53am    
Instead of putting it in solution block, please update your question.

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