When Press F5 in my web page, it is making fresh call to the page and IsPostBack is false though after many click on button on same page

HI,

 I am Using .net 3.5 and vs 2008. In my project there is a Master page also.

Actually my problem is. when navigate to the Page say "Home.aspx",  IsPostback is false and relevant code is executed.

After that Button1 is clicked in home page, this time IsPostback is true and corresponding code and Button1_click code is executed.

In this situation F5 is pressed, as per the aspx lifecycle IspostBack is true and Button1_click must be executed. but in my case it is pretty diffrent, i.e IsPostback  is false and page is

loading freshly as firstime request to the Home.aspx.

What is the mistake I made??

if(!this.IsPostBack)

{

ShowGrid(); /// this code executing when click on F5

}

Thanks for the advance.

 

 


Thanks & Regards
JNS

Remember to click on Mark as answer on the post that helped you
0
jnagasuresh
11/12/2008 1:06:20 PM
asp.net.ajax-discussion 13973 articles. 1 followers. Follow

4 Replies
1370 Views

Similar Articles

[PageSpeed] 54

 I don't see the issue here ... F5 refreshes the page - it just a new call to the page so IsPostBack is false.


http://acroitoriu.spaces.live.com
"No complexity beyond what is necessary"
0
acroitoriu
11/12/2008 1:47:00 PM

HI,

Thanks for the reply.

Yes You are true if it is after a very first request to the particular page.

but, I am sure that after a button click or any other request from the particular page when we press F5 it must be process last request(which is Ispagepost is true).

I checked with other some dummy wesite which as singel page and just a button,  and proved it is true. but with my project it is happening some thing different Indifferent.


Thanks & Regards
JNS

Remember to click on Mark as answer on the post that helped you
0
jnagasuresh
11/12/2008 1:59:15 PM
Hi jnagasuresh
 
In this scenario, I guess your button might be in an UpdatePanel, or does an AJAX call.
 
If so, it is not an issue, because the AJAX is not post the full page to server. And it is different from a simple page which just contains a button.
 
Thanks.

 


Lance Zhang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Lance
11/14/2008 4:38:57 AM

HI,

Thanks for the reply,

You are right, ajax is used in project.

But problem is, at first time loading the page we are checking the session object and retriving the session value and making the session null.

When user press the F5 the request is going as first request, so it is checking the session, this time session is null, so it causes the navigating to error page.

so any alternative? pls respond.


Thanks & Regards
JNS

Remember to click on Mark as answer on the post that helped you
0
jnagasuresh
11/14/2008 7:31:51 AM
Reply:

Similar Artilces:

Paging Paging Paging
I am trying to do paging with my search results and it isnt working very well. Here is what I've tried and I feel I've tried everything, lol, please help me out. Sub DataGrid1_SortCommand(Sender as object, e as DataGridSortCOmmandEventArgs) DataGrid1.DataBind() End Sub Sub Datagrid1_PageIndexChanged(Sender as object, e as DataGridPageChangedEventArgs) Dim ds as dataSet DataGrid1.CurrentPageIndex = e.NewPageIndex if Session("Search") is nothing then 'Session probably has expired, get the datasource from database Datagrid1.DataSource = ...

when i click submit button,then this page close and new page open.Problem is that after submit button click page take too much time to close.i want to put something like page loading image after "subm
when i click submit button,then this page close and new page open.Problem is that after submit button click page take too much time to close.i want to put something like page loading image after "submit button" click & i want to display this loading image till page will be close. please help...... Dim strscript As String strscript = "" strscript &= "window.close();" strscript &= "window.opener.location.reload();" strscript &= "" 'Literal1.Text = strscrip...

In a web page(c#), I want to call another page and come back to next instruction of calling page
In a web page(c#), I want to call another page and come back to next instruction of calling page. Called page have no web item , it has only c# codes. after executing of this page (by IExplore), I want the remaining lines of calling page to be executed. How can I do that? What are you trying to do? What is the second page accomplishing? Will the first page stay open and the second page closes? You might be able to use WebRequest and WebResponse to do what you want. Hey bro, since you say that the called page has no web items, why dont you put the code in the called pa...

page up / page down
Name: Kyle Morrison Email: kymorris_at_cisco.com Product: Deer Park Summary: page up / page down Comments: page up and page down do not work mac osx 10.3.9 Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+ ...

Page Down / Page Up
I have tried this on the google groups - advanced search, but get nothing. So, here is what I am trying to do ... PB 11.1 / Postgres : List datawindow on top with all desired records. : Form Datawindow on bottom showing the detail information for the selected record : I share the datawindow buffer with the detail and manage the scrolling accordingly. Now, in the detail window, I have multiple line 'comment' fields. when the cursor is in the comment field (again multiple lines that usually scroll outside the 'box'), the user wants to be able to hit page down /...

Page To Page
Hi How can i call to a Text that has been written in a different page(in a TextBox). I want to call him to make a SELECT quastion. Thank's....

Modify few web page with Ajax compatible web page
Dear Friends I have already completed my C# web project and now I have decided that few of the pages needs to be redesign with AJAX to minimise page flickering. Now the point is I was using C# vs2005 and yesterday have installed AJAX part with vs2005 platform. Hope there will be no isses for modifying few pages with Ajax compatible pages from existing web project. Hope there is no need to create a fresh web project with asp.net AJAX enabled web site. Please confirm and thanx again Samir Hi, you obviously didn't choose the AJAX template to start your project with ...

AJAX, Calling a web service inside Master page from its child page
Dear Team  I am using ASP.NET2.0, C#, AJAX.  I am having a Master page that I add inside it a script manager: <form id="form1" runat="server" defaultbutton="btnMaster">    <asp:ScriptManager ID="ScriptManager1" runat="server">        <Services>            <asp:ServiceReference Path="QuoteDeleteRow.asmx"/>        </Services>    </as...

Which page has called a page
Hello, Is a page able to know which page has called it ? If Page_A and Page_B can call Page_C, I would want to know during Page_Load of Page_C if it is Page_A or Page_B which is the calling page ? Thank's Alain You could try using Request.UrlReferrer. This will give you the complete url, type: http://localhost/NetSamples/Employees.aspx To strip away everything unecessary like Querystrings etc. you could use something like this: Dim strReferrer As String = Request.UrlReferrer.ToString Dim intStart As Int32 = strReferrer.LastIndexOf("/") + 1 ...

Postback of one frame in response to click of a image button in another frame in the same page(Note:-Both frames there are 2 different aspx page but in a same page page using 2 frames)
Hi all, I am having a C# coded page with 2 different frames in it.This 2 frames contain each an aspx file.So the functionality am trying is I have image buttons in one frame .So when i click that image button the other frame i have should load with a specified image in it. I tried redirecting it but that happens only in the first frame where the image buttons are.Resulted in showing the 2 frames in the first frame. I am stuck in this for almost a day.Please can anyone help regarding this?. Regards, Joseph look into the Target attribute of the anchor: for example: <a h...

Cross-Page PostBackUrl
 Hi, I have a problem with cross-page posting from a details view control (also tried with forms view control). I have a public property in the source page who's value is assigned after a button click. I have assigned a PostBackUrl to the Edit command of the details view, which is clicked AFTER i have click the button to assign the value of the property. My problem is that the destination page for the PostBackUrl is not getting the value assigned to the property. I created a test page to demonstrate this (i also added a non-assigned property to show the difference):Source ...

3.5 Beta- when I click on the home page button-4 pages load in addition to my home page, MSN, NoScrips,addblocker&welcome to Firefox 3.5. I want only my chosen home page to load
Name: Holly R. Blagg Email: hrblaggatyahoodotcom Product: Firefox Summary: 3.5 Beta- when I click on the home page button-4 pages load in addition to my home page, MSN, NoScrips,addblocker&welcome to Firefox 3.5. I want only my chosen home page to load Comments: From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

how to navigate the url page in one web application page to another web application page
In my project one solution have 2 web apllications in one folder.like 1.webapplication1 2.webapplication2. in firt webapplication1 i created one aspx page like sample.axpx. in second webapplication2 i created one aspx page like sample2.aspx... in sample2.aspx page have hyperlinl. I need to navigate this hyperlink when i click it go to the sample.axpx. how can i write navigate url for this...help me. ..thanks  As i understand u, you need Multi Project soltuionsee this link, http://community.rainbowportal.net/blogs/jonathans_rainbow_blog/archive/2006/02/19...

How to make use of master page class name in the page which is making use of master page
Hi All, Suppose page 1 makes use of one  master page say master1 How to make use of master page class name in page1.   Thanks and regards Abdul  You can use the masterpage class by adding a refference of the master page in the aspx. You can add the reference directly in the page tag or use a <%@ MasterType %> tage to refer the master page typeVikram www.vikramlakhotia.comPlease mark the answer if it helped you Hi, abdulmg:How to make use of master page class name in page1. You can try to do like below: YourMasterPagesClassName master = (YourMasterPagesClassN...

Web resources about - When Press F5 in my web page, it is making fresh call to the page and IsPostBack is false though after many click on button on same page - asp.net.ajax-discussion

C# dotnet SQL editor (codebehind side)
... this diy SQL... protected void Page_Load(object sender, EventArgs e){ // Load the connections only the first time the page is loaded if (!IsPostBack) ...

Silverlight, FireFox and 100%
In my last post I mentioned something nice about FireFox. In this post I’ll talk something not that nice about FireFox and the way we, more or ...

Visual Studio 11 Beta in Context
... : System.Web.UI.Page { private readonly DemoWhateverDataContext _db = new DemoWhateverDataContext(); public void Page_Load() { if (!IsPostBack) ...

Recent questions
Recent questions

Upgrading to JSF 2
... at org.apache.myfaces.lifecycle.DefaultRestoreViewSupport.isPostback(DefaultRestoreViewSupport.java:179) at org.apache.myfaces.lifecycle.Re ...

CodeSOD: Count On It
... right for Request.QueryString["number"]; , but not this special snowflake: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) ...

Fully Editable Datagrid - Pale Musings
This is the text from an article I wrote back in April of 2003 and had published on the original DotNetJunkies site. After my recent change in ...

WebstersProdigy
Colored Hat. New post around the First of the Month

Check Uncheck all CheckBoxes in an ASP.NET GridView using jQuery
... partial class Default4 : System.Web.UI.Page{ List listEmp = new List (); protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) ...

QueryHome
QueryHome: Community edited question and answer site for technical collaboration and technical networking.

Resources last updated: 1/7/2016 2:58:13 AM