RadNotification loading again when pressing f5

2 posts, 1 answers
  1. Prasanth100
    Prasanth100 avatar
    17 posts
    Member since:
    Oct 2012

    Posted 30 Dec 2013 Link to this post

    Hi Gurus,

     I am using RadNotification,when clicking submit button the notification window is displaying with success message.
    here the issue is when pressing f5,RadNotification window is displaying again.
    I am using RadNotification1.VisibleOnPageLoad = false on page_load event. but still the notification window is opening.

    How to resolve this.

    Thanks in Advance,

  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Dec 2013 Link to this post

    Hi Prasanth,

    Please have a look into the following code snippet to achieve your scenario.

    private bool _refreshState;
    private bool _isRefresh;
    protected override void LoadViewState(object savedState)
        object[] AllStates = (object[])savedState;
        _refreshState = bool.Parse(AllStates[1].ToString());
        _isRefresh = _refreshState == bool.Parse(Session["__ISREFRESH"].ToString());
    protected override object SaveViewState()
        Session["__ISREFRESH"] = _refreshState;
        object[] AllStates = new object[2];
        AllStates[0] = base.SaveViewState();
        AllStates[1] = !(_refreshState);
        return AllStates;
    protected void RadButton1_Click(object sender, EventArgs e)
        if (!_isRefresh)
            RadNotification1.VisibleOnPageLoad = true;

    Hope this will helps you.
Back to Top