Hi
If I add a UserControl to a placeholder on a page during that pages PreRender
stage and press a button on that UserControl will the postback for that button
get processed?
I would have thought yes because on adding the control I would have
thought that the OnInit, IPostBackDataHandler, etc calls would then be
applied purely to that calendar, however it doesn't seem to be happening
I'm getting around this at the moment by adding the UserControl to
the placeholder in the OnInit stage and if it shouldn't be there I'm
removing it in the PreRender stage
Thanks for any help
F 6 1942
Are you re-adding the UserControl with the next PostBack? If so, are you
re-adding it prior to the LoadPostData Event?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Big Things are made up of
Lots of Little Things.
<fo******@yahoo.co.uk> wrote in message
news:ac**************************@posting.google.c om... Hi If I add a UserControl to a placeholder on a page during that pages
PreRender stage and press a button on that UserControl will the postback for that
button get processed? I would have thought yes because on adding the control I would have thought that the OnInit, IPostBackDataHandler, etc calls would then be applied purely to that calendar, however it doesn't seem to be happening I'm getting around this at the moment by adding the UserControl to the placeholder in the OnInit stage and if it shouldn't be there I'm removing it in the PreRender stage
Thanks for any help
F
Are you re-adding the UserControl with the next PostBack? If so, are you
re-adding it prior to the LoadPostData Event?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Big Things are made up of
Lots of Little Things.
<fo******@yahoo.co.uk> wrote in message
news:ac**************************@posting.google.c om... Hi If I add a UserControl to a placeholder on a page during that pages
PreRender stage and press a button on that UserControl will the postback for that
button get processed? I would have thought yes because on adding the control I would have thought that the OnInit, IPostBackDataHandler, etc calls would then be applied purely to that calendar, however it doesn't seem to be happening I'm getting around this at the moment by adding the UserControl to the placeholder in the OnInit stage and if it shouldn't be there I'm removing it in the PreRender stage
Thanks for any help
F
Looks like your viewstate is out of sync with your page's controls, since
you dynamically added some at
runtime... http://msdn.microsoft.com/library/de...ibrary/en-us/v
bcon/html/vbtskaddingcontrolstowebformspageprogrammatically. asp
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:#8**************@TK2MSFTNGP12.phx.gbl... Are you re-adding the UserControl with the next PostBack? If so, are you re-adding it prior to the LoadPostData Event?
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Big Things are made up of Lots of Little Things.
<fo******@yahoo.co.uk> wrote in message news:ac**************************@posting.google.c om... Hi If I add a UserControl to a placeholder on a page during that pages PreRender stage and press a button on that UserControl will the postback for that button get processed? I would have thought yes because on adding the control I would have thought that the OnInit, IPostBackDataHandler, etc calls would then be applied purely to that calendar, however it doesn't seem to be happening I'm getting around this at the moment by adding the UserControl to the placeholder in the OnInit stage and if it shouldn't be there I'm removing it in the PreRender stage
Thanks for any help
F
Looks like your viewstate is out of sync with your page's controls, since
you dynamically added some at
runtime... http://msdn.microsoft.com/library/de...ibrary/en-us/v
bcon/html/vbtskaddingcontrolstowebformspageprogrammatically. asp
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:#8**************@TK2MSFTNGP12.phx.gbl... Are you re-adding the UserControl with the next PostBack? If so, are you re-adding it prior to the LoadPostData Event?
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Big Things are made up of Lots of Little Things.
<fo******@yahoo.co.uk> wrote in message news:ac**************************@posting.google.c om... Hi If I add a UserControl to a placeholder on a page during that pages PreRender stage and press a button on that UserControl will the postback for that button get processed? I would have thought yes because on adding the control I would have thought that the OnInit, IPostBackDataHandler, etc calls would then be applied purely to that calendar, however it doesn't seem to be happening I'm getting around this at the moment by adding the UserControl to the placeholder in the OnInit stage and if it shouldn't be there I'm removing it in the PreRender stage
Thanks for any help
F
> Are you re-adding the UserControl with the next PostBack? If so, are you re-adding it prior to the LoadPostData Event?
The page has a button and a placeholder. The button is toggling a flag.
If by the PreRender stage (i.e. after postbacks) the flag has been set
then the UserControl is placed in the placeholder. The flag is a static
member variable (at the moment) so once its set it stays set until the
button is pressed again and the UserControl is loaded.
> Are you re-adding the UserControl with the next PostBack? If so, are you re-adding it prior to the LoadPostData Event?
The page has a button and a placeholder. The button is toggling a flag.
If by the PreRender stage (i.e. after postbacks) the flag has been set
then the UserControl is placed in the placeholder. The flag is a static
member variable (at the moment) so once its set it stays set until the
button is pressed again and the UserControl is loaded. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: foldface |
last post by:
Hi
If I add a UserControl to a placeholder on a page during that pages PreRender
stage and press a button on that UserControl will the postback for that button
get processed?
I would have thought...
|
by: Kenton Smeltzer |
last post by:
Hello All,
I am having a problem with events and the addition of
controls on a page I am developing. First let me tell you
what I have tried and then maybe someone can see something
I missed.
...
|
by: luca |
last post by:
I'm trying to build a Server Control, it's a calendar to manage sellers
appointments (don't answer me to use and custumize Calendar Control because
unluckily it's not possible for this specific...
|
by: D Sheldon |
last post by:
I am creating a server control that adds web controls (i.e. textboxes, etc) to a form. I use HtmlTable to build the table and insert the controls. Now I want to add validators to the textbox. Here...
|
by: Dominique Vandensteen |
last post by:
I have a Table to which I add a LinkButton in the PreRender event
The LinkButton is visible on the webpage but when I click it,
the LinkButton_Click method is not called and the page just "reloads"...
| |
by: Mr Newbie |
last post by:
I was thinking about developing a workflow application yesterday and was
musing over the different approaches than one could take in restricting
specific actions on a ticket( Form ) at any said...
|
by: Fred |
last post by:
hi, i have a page written by someone else w/ a few user controls inside
it(w/ user controls inside em too) - what i dont get is the order
different page_inits, page_loads, cashed and postback...
|
by: Khafancoder |
last post by:
Hi guys,
i'm trying to change all of page control's (root controls and inner
controls) forecolor in PreRender event.
it works fine but when a postback occures by detailsview command
buttons, it...
|
by: balabaster |
last post by:
I've got a user control that builds a table of dynamic data based on a :LINQ class holding the data. The data is loaded using the LoadData(DataInstance) method. The table it builds contains a...
|
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,...
|
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: 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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |