Click here to Skip to main content
16,004,924 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Help!! Event handler fires everytime I refresh the page! Pin
Pete O'Hanlon3-Jan-07 5:11
mvePete O'Hanlon3-Jan-07 5:11 
AnswerRe: Help!! Event handler fires everytime I refresh the page! Pin
Paszt3-Jan-07 9:53
Paszt3-Jan-07 9:53 
GeneralRe: Help!! Event handler fires everytime I refresh the page! Pin
Grapes-R-Fun3-Jan-07 10:01
Grapes-R-Fun3-Jan-07 10:01 
AnswerRe: Help!! Event handler fires everytime I refresh the page! Pin
nagendra rao s.v.3-Jan-07 18:47
nagendra rao s.v.3-Jan-07 18:47 
GeneralRe: Help!! Event handler fires everytime I refresh the page! Pin
Grapes-R-Fun4-Jan-07 6:10
Grapes-R-Fun4-Jan-07 6:10 
GeneralRe: Help!! Event handler fires everytime I refresh the page! Pin
nagendra rao s.v.4-Jan-07 16:47
nagendra rao s.v.4-Jan-07 16:47 
GeneralRe: Help!! Event handler fires everytime I refresh the page! Pin
Grapes-R-Fun5-Jan-07 4:51
Grapes-R-Fun5-Jan-07 4:51 
AnswerRe: Help!! Event handler fires everytime I refresh the page! Pin
Deepak the Cool4-Jan-07 0:43
Deepak the Cool4-Jan-07 0:43 
just put and change according to ur need following code into

public partial class<br />
{<br />
private bool _refreshState; //define bool type variable which return to Refresh state in Internet Explorer<br />
    private bool _isRefresh;    //define bool type variable which return wheather Refresh click or not in Internet Explorer<br />
<br />
    public bool IsRefresh //<br />
    {<br />
        get <br />
        {<br />
            return _isRefresh;//get the value of Refresh click from Internet Explorer<br />
        }<br />
    }<br />
    protected override object SaveViewState()<br />
    {<br />
        Session["_ISREFRESH"] = _refreshState; //define Session variable and intilize <br />
        object[] allstates = new object[2];    // Define object array named allstates<br />
        allstates[0] = base.SaveViewState();   //get the base.SaveViewState in allstate array at 0 position<br />
        allstates[1] = !_refreshState;         //get the  allstate array at 1 position from !_refreshState<br />
        return allstates;<br />
    }<br />
    protected override void LoadViewState(object savedState)//function for LoadViewState<br />
    {<br />
        try<br />
        {<br />
            object[] allstates = (object[])savedState;  //Parsing saveState value at allsataes object array<br />
            base.LoadViewState(allstates[0]);           //Loading viewState value<br />
            _refreshState = (bool)allstates[1];<br />
            _isRefresh = _refreshState == (bool)Session["_ISREFRESH"];<br />
        }<br />
        catch (Exception e)<br />
        {<br />
                  }<br />
    }<br />
}



and which event is called thru Refresh just put flowwowing code into

if (_isRefresh == false)<br />
        {<br />
<br />
your code for event is here<br />
<br />
}



hope tht'll helps u

Smile | :)




Deepak

Smile a Lots,Its Costs Nothing

GeneralRe: Help!! Event handler fires everytime I refresh the page! Pin
Grapes-R-Fun4-Jan-07 6:07
Grapes-R-Fun4-Jan-07 6:07 
Questionprolem with dropdownlist_selectedindex Pin
mohd imran abdul aziz3-Jan-07 3:30
mohd imran abdul aziz3-Jan-07 3:30 
AnswerRe: prolem with dropdownlist_selectedindex Pin
Not Active3-Jan-07 3:58
mentorNot Active3-Jan-07 3:58 
AnswerRe: prolem with dropdownlist_selectedindex Pin
ednrgc3-Jan-07 4:37
ednrgc3-Jan-07 4:37 
AnswerRe: prolem with dropdownlist_selectedindex Pin
Deepak the Cool4-Jan-07 0:47
Deepak the Cool4-Jan-07 0:47 
Questioncontact form Pin
sacheesach3-Jan-07 1:55
sacheesach3-Jan-07 1:55 
AnswerRe: contact form Pin
varshavmane3-Jan-07 1:59
varshavmane3-Jan-07 1:59 
GeneralRe: contact form Pin
sacheesach3-Jan-07 2:11
sacheesach3-Jan-07 2:11 
GeneralRe: contact form Pin
Not Active3-Jan-07 2:13
mentorNot Active3-Jan-07 2:13 
GeneralRe: contact form Pin
varshavmane3-Jan-07 2:17
varshavmane3-Jan-07 2:17 
GeneralRe: contact form Pin
ADY0073-Jan-07 12:41
ADY0073-Jan-07 12:41 
Questionhow to get the number of primary keys in crecordset Pin
prithaa3-Jan-07 1:41
prithaa3-Jan-07 1:41 
GeneralRe: how to get the number of primary keys in crecordset Pin
Guffa3-Jan-07 2:57
Guffa3-Jan-07 2:57 
GeneralRe: how to get the number of primary keys in crecordset Pin
RichardGrimmer3-Jan-07 4:32
RichardGrimmer3-Jan-07 4:32 
AnswerRe: how to get the number of primary keys in crecordset Pin
Paddy Boyd3-Jan-07 3:06
Paddy Boyd3-Jan-07 3:06 
QuestionMultiple column dropdown menus Pin
gvirden3-Jan-07 1:11
gvirden3-Jan-07 1:11 
AnswerRe: Multiple column dropdown menus Pin
Venkatesh Mookkan3-Jan-07 1:16
Venkatesh Mookkan3-Jan-07 1:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.