Click here to Skip to main content
15,917,608 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 0:00
nagendrathecoder14-Apr-10 0:00 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan14-Apr-10 0:25
Morgs Morgan14-Apr-10 0:25 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 0:33
nagendrathecoder14-Apr-10 0:33 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan14-Apr-10 1:20
Morgs Morgan14-Apr-10 1:20 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 2:02
nagendrathecoder14-Apr-10 2:02 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan14-Apr-10 2:30
Morgs Morgan14-Apr-10 2:30 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 2:42
nagendrathecoder14-Apr-10 2:42 
QuestionResponse.Write in aspx file Pin
Abdul Rahman Hamidy13-Apr-10 18:17
Abdul Rahman Hamidy13-Apr-10 18:17 
Dear All,
I have following code in PageLoad Event
protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)                               //------I
            Session["FilteredTable"] = string.Empty;     
        if (Page.IsPostBack)                                //-------II
        {
            try
            {
                bindSelectedFields();
                bindReport();
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message + "<br>"+ ex.StackTrace);
            }
        }
    }

and the same I have Code in design time
<table id="tFilterButton" ><%Response.Write(hidRmvFilter.Value);%></table>

which hidRmvFilter is hidden field.
the thing is I want to empty session variable at first visit of page. but in above code I dont know what is wrong which the session gets empty at any postback. I debugged the code and checked that when it reaches
<table id="tFilterButton" ><%Response.Write(hidRmvFilter.Value);%></table>

it again goes to the first IF block (I).

any ideas why the session gets empty at each postback or I am looking to an alternative to store session variable at any postback which it should get empty only in first page visit?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan

AnswerRe: Response.Write in aspx file Pin
Viral Upadhyay13-Apr-10 19:26
Viral Upadhyay13-Apr-10 19:26 
AnswerRe: Response.Write in aspx file Pin
Martin Jarvis13-Apr-10 20:38
Martin Jarvis13-Apr-10 20:38 
GeneralRe: Response.Write in aspx file Pin
Abdul Rahman Hamidy16-Apr-10 18:37
Abdul Rahman Hamidy16-Apr-10 18:37 
QuestionError WebForm_InitCallback and WebForm_DoCallback is not defined Pin
Tridip Bhattacharjee13-Apr-10 8:21
professionalTridip Bhattacharjee13-Apr-10 8:21 
AnswerRe: Error WebForm_InitCallback and WebForm_DoCallback is not defined Pin
daveyerwin13-Apr-10 9:44
daveyerwin13-Apr-10 9:44 
AnswerRe: Error WebForm_InitCallback and WebForm_DoCallback is not defined Pin
T M Gray13-Apr-10 10:21
T M Gray13-Apr-10 10:21 
GeneralRe: Error WebForm_InitCallback and WebForm_DoCallback is not defined Pin
Tridip Bhattacharjee13-Apr-10 19:52
professionalTridip Bhattacharjee13-Apr-10 19:52 
QuestionApplying theme to User Control. Pin
paper6713-Apr-10 3:43
paper6713-Apr-10 3:43 
AnswerRe: Applying theme to User Control. Pin
buaaytt15-Jul-10 23:11
buaaytt15-Jul-10 23:11 
Questionclickable gridview Pin
tek 200913-Apr-10 1:50
tek 200913-Apr-10 1:50 
AnswerRe: clickable gridview Pin
Sneha Bisht13-Apr-10 2:10
Sneha Bisht13-Apr-10 2:10 
GeneralRe: clickable gridview Pin
tek 200913-Apr-10 4:24
tek 200913-Apr-10 4:24 
GeneralRe: clickable gridview Pin
tek 200913-Apr-10 5:04
tek 200913-Apr-10 5:04 
AnswerRe: clickable gridview Pin
Abhijit Jana13-Apr-10 6:18
professionalAbhijit Jana13-Apr-10 6:18 
GeneralRe: clickable gridview Pin
tek 200913-Apr-10 7:45
tek 200913-Apr-10 7:45 
Questioncheck if flash plugin intalled on browser Pin
gottimukkala13-Apr-10 1:12
gottimukkala13-Apr-10 1:12 
AnswerRe: check if flash plugin intalled on browser Pin
Martin Jarvis13-Apr-10 9:14
Martin Jarvis13-Apr-10 9:14 

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.