473,387 Members | 3,787 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,387 software developers and data experts.

Post-back and user controls

Hello!

How I can force user controls to reload on post-back?

Thank you!
James
Nov 19 '05 #1
3 1282
What exactly do you mean? If the user Control is declared on the page (in
the ASPX file) then it's automatically "reloaded" upon postback. If it's
dynamically added, then you'll have to recreate it yourself manually upon
postback. Here's a sample I posted a while back (it doesn't do user controls,
but they should work just the same):

http://groups-beta.google.com/group/...717a97bd32c450

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hello!

How I can force user controls to reload on post-back?

Thank you!
James


Nov 19 '05 #2
I use some user controls to customise page layout...There are two user
controls that check if the user is authenticated or not and display data
based on this.

My problem is that if I call FormsAuthentication.SignOut() it causes
post-back, but other user controls on the page don't detect that the user is
logged-off.

James

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:59**********************@msnews.microsoft.com ...
What exactly do you mean? If the user Control is declared on the page (in
the ASPX file) then it's automatically "reloaded" upon postback. If it's
dynamically added, then you'll have to recreate it yourself manually upon
postback. Here's a sample I posted a while back (it doesn't do user
controls, but they should work just the same):

http://groups-beta.google.com/group/...717a97bd32c450

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hello!

How I can force user controls to reload on post-back?

Thank you!
James


Nov 19 '05 #3
> My problem is that if I call FormsAuthentication.SignOut() it causes
post-back, but other user controls on the page don't detect that the
user is logged-off.


It's because during the postback to log out you're still authenticated. I'd
suggest doing a Response.Redirect(Request.Path) in your event handler when
you detect they want to logout. It isn't pretty, but it works.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #4

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

Similar topics

2
by: Erik Johnson | last post by:
I am trying to work with a program that is trying make an HTTP POST of text data without any named form parameter. (I don't know - is that a normal thing to do?) I need to write a CGI program that...
15
by: Thomas Scheiderich | last post by:
I am trying to understand Session variables and ran into a question on how they work with data that is passed. I have an HTM file that calls an ASP file and sends the name either by GET or POST....
0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
24
by: moriman | last post by:
Hi, The script below *used* to work. I have only just set up a server, PHP etc again on my Win98 system and now it doesn't? On first loading this page, you would have $p = and the button...
9
by: c676228 | last post by:
Hi, I am new to this discussion forum. I started to post questions on this forum since this Jan. and got many good responses and I am very appreciated to those who are willing to help with their...
3
by: JansenH | last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a webserver. This is working fine if the post rate is one post for every 20 seconds. But if the post rate is increased to...
6
by: Brybot | last post by:
I am trying to allow HTTP POST file uploads to my web service. Currently I have it working perfectly for a SOAP/XML request reading in a byte using MemoryStream/FileStream but I cannot figure out...
10
by: Peter Michaux | last post by:
Hi, All Ajax libraries I've read use encodeURIComponent() on the name- value pairs extracted from forms before POST ing the result to the server with and xmlhttprequest. I can understand why...
9
by: CindyH | last post by:
Hi Trying to get this code to work for http xml post. I need the post to be xml (doc.outerxml) sent in single key name as stream. The following is the post code and code for receiving the request....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.