473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

manual rendering of control on postback?

Hi everyone!

I have a user control (not ascx though - rendered when the page loads),
actually it's a basket control on a master page.

This master page includes a wizard page too,
however when the user clicks next to navigate to another page (e.g. page2),
I remove the basket's contents,
but, if he presses the back button,
he will see the basket full, even if the basket is empty,
because the basket isn't rendered again (postback on page1)!

So, how can I make this control render again, manually somehow?

Thanks in advance!
Apr 15 '07 #1
5 1984
Patrick,
A tisket, a tasket. A dynamically rendered control needs to be re-created
when there is a postback. If they press the back button and it still shows up
with what was on the original page, then you need to address cachine
directives that will tell the browser NOT to cache the page. This would make
the brower re-request the page when you press the "back" button. There could
be other issues too, but that would be where I'd start.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"patrickdrd" wrote:
Hi everyone!

I have a user control (not ascx though - rendered when the page loads),
actually it's a basket control on a master page.

This master page includes a wizard page too,
however when the user clicks next to navigate to another page (e.g. page2),
I remove the basket's contents,
but, if he presses the back button,
he will see the basket full, even if the basket is empty,
because the basket isn't rendered again (postback on page1)!

So, how can I make this control render again, manually somehow?

Thanks in advance!
Apr 15 '07 #2
Ok, I understand,
but what do you suggest,

leave it as is,
looking not empty,
while it is empty instead?

Some guy in another forum suggested that I use:

put the following code in the PreRender handler

Response.CacheControl = "no-cache";

Response.Expires = -1;
This is a bad idea?
Apr 16 '07 #3
That is precisely along the lines I was suggesting.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"patrickdrd" wrote:
Ok, I understand,
but what do you suggest,

leave it as is,
looking not empty,
while it is empty instead?

Some guy in another forum suggested that I use:

put the following code in the PreRender handler

Response.CacheControl = "no-cache";

Response.Expires = -1;

This is a bad idea?
Apr 16 '07 #4
Ok, I'll try tomorrow
Apr 16 '07 #5
unfortunately, didn't work
Apr 16 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James | last post by:
Hello: I have seen several postings on this, but forgive me - I am having difficulty understanding them. I am trying to figure out how to manually cause a postback to happen without a user...
3
by: David Whitney | last post by:
All: I have a control that renders a table. As the table is rendered, each row in the table is constructed by creating a run-time (dynamic) object that is derived from an HtmlTableRow. The row...
5
by: Dan | last post by:
Hi, I'd like to find out the control that caused a postback to be raised. Obviously this could simply done in a control event handler. I am not going to do this method and would like no...
0
by: AJP | last post by:
I have a child window which does the following after a button is pressed: Response.Write("<script>window.opener.__doPostBack('','');</script>"); but I get the following uncaught exception upon...
1
by: news.microsoft.com | last post by:
If I have an ASP.net button inside a template for a custom control and use the code below, everything works fine and it generates the correct id and the asp.net button calls serverside click event...
2
by: Workgroups | last post by:
I need to scroll a virtual grid that is 1.2M pixels x 1.28M pixels in size. I think this is too large of a size for a control or a form, so I think I need to "fake it" with a custom drawn control....
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
1
by: KC | last post by:
Is there anyway to tell an HtmlAnchor or Hyperlink cotroll to *not* turn a "#" in the href into the page or control page location. For example, when I place <a runat="server" id="tabLink"...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.