Hi All,
I am loading a web user control (.NET 2.0) into a placeholder on a content
page ( plus the use of a master page).
The controls is a list of companie, one you select a company for editing,
the edit button loads the "editcompany.ascx" control into the placeholder
which was just occupied by the "companylist.ascx" control.
This all works just fine, but I gues you see my problem coming.... as soon
as you click any of the buttons on the "editcompany.ascx" control the page is
reloaded and it goes back to the original list without even touching the
event of the button which triggered the postback.
I know it happens because the control is loaded on the "edit" event from the
original list, which means that the page is updated after the viewstate has
been completed.
I am now wondering if somebody has used this thechnique successfully before,
and I don't want to do redirects to another page with some data in the QS, I
want it to stay within the same page, at least for related functionallity.
Any pointers to articles or tips are greatly appreciated.
Thanks
Wouter 3 1534
Wouter,
I have a few samples that may be helpful to you on my website. Go to http://www.aboutfortunate.com?page=codelibrary and use the search box there
to search for dynamic control. The top hits you get are all going to give
you little necessary pieces to do what you wish.
If you have any questions after looking at the samples feel free to contact
me.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Wouter" <Wo****@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com... Hi All,
I am loading a web user control (.NET 2.0) into a placeholder on a content page ( plus the use of a master page).
The controls is a list of companie, one you select a company for editing, the edit button loads the "editcompany.ascx" control into the placeholder which was just occupied by the "companylist.ascx" control.
This all works just fine, but I gues you see my problem coming.... as soon as you click any of the buttons on the "editcompany.ascx" control the page is reloaded and it goes back to the original list without even touching the event of the button which triggered the postback.
I know it happens because the control is loaded on the "edit" event from the original list, which means that the page is updated after the viewstate has been completed.
I am now wondering if somebody has used this thechnique successfully before, and I don't want to do redirects to another page with some data in the QS, I want it to stay within the same page, at least for related functionallity.
Any pointers to articles or tips are greatly appreciated.
Thanks
Wouter
Hi Justin,
Thanks for the link to your site and the articles you have there.
I have to experiment with the some bits and pieces of code you have there to
see if it works for me too.
I'll let you know how it goes,
Thanks again,
Wouter
"S. Justin Gengo [MCP]" wrote: Wouter,
I have a few samples that may be helpful to you on my website. Go to http://www.aboutfortunate.com?page=codelibrary and use the search box there to search for dynamic control. The top hits you get are all going to give you little necessary pieces to do what you wish.
If you have any questions after looking at the samples feel free to contact me.
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Wouter" <Wo****@discussions.microsoft.com> wrote in message news:5F**********************************@microsof t.com... Hi All,
I am loading a web user control (.NET 2.0) into a placeholder on a content page ( plus the use of a master page).
The controls is a list of companie, one you select a company for editing, the edit button loads the "editcompany.ascx" control into the placeholder which was just occupied by the "companylist.ascx" control.
This all works just fine, but I gues you see my problem coming.... as soon as you click any of the buttons on the "editcompany.ascx" control the page is reloaded and it goes back to the original list without even touching the event of the button which triggered the postback.
I know it happens because the control is loaded on the "edit" event from the original list, which means that the page is updated after the viewstate has been completed.
I am now wondering if somebody has used this thechnique successfully before, and I don't want to do redirects to another page with some data in the QS, I want it to stay within the same page, at least for related functionallity.
Any pointers to articles or tips are greatly appreciated.
Thanks
Wouter
Hi Justin,
Thanks again, in the end I used your article "Dynamically added user
control's button click event doesn't fire until second time clicked?" and
place the ID = "ControlID"; in the page_onload event of the control..
That seemed to have solved the problem.
Thanks,
Wouter
"S. Justin Gengo [MCP]" wrote: Wouter,
I have a few samples that may be helpful to you on my website. Go to http://www.aboutfortunate.com?page=codelibrary and use the search box there to search for dynamic control. The top hits you get are all going to give you little necessary pieces to do what you wish.
If you have any questions after looking at the samples feel free to contact me.
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Wouter" <Wo****@discussions.microsoft.com> wrote in message news:5F**********************************@microsof t.com... Hi All,
I am loading a web user control (.NET 2.0) into a placeholder on a content page ( plus the use of a master page).
The controls is a list of companie, one you select a company for editing, the edit button loads the "editcompany.ascx" control into the placeholder which was just occupied by the "companylist.ascx" control.
This all works just fine, but I gues you see my problem coming.... as soon as you click any of the buttons on the "editcompany.ascx" control the page is reloaded and it goes back to the original list without even touching the event of the button which triggered the postback.
I know it happens because the control is loaded on the "edit" event from the original list, which means that the page is updated after the viewstate has been completed.
I am now wondering if somebody has used this thechnique successfully before, and I don't want to do redirects to another page with some data in the QS, I want it to stay within the same page, at least for related functionallity.
Any pointers to articles or tips are greatly appreciated.
Thanks
Wouter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tim T |
last post by:
Hi,
I have the need to use dynamically loaded user controls in a webform page.
I have the controls loading dynamically, and that part works fine. this is
the code used in a webform to dynamically...
|
by: Earl Teigrob |
last post by:
PROBLEM:
When a user control is loaded into a PlaceHolder control more than once, the
events do not fire on the first click of a control on the dynamically loaded
user control. In other words, the...
|
by: Greg |
last post by:
In my ASP.NET application I have a button that when pressed, data needs to
be saved based on what the user typed in. I have other controls on the same
page that should be updated as a result of the...
|
by: Josh |
last post by:
Hi Guys,
I have been having a big problem with trying to pass parameters into a
user control when the user control is dynamically loaded into a
placholder. I am developing in c#. I have get...
|
by: Harry |
last post by:
Hello,
I have a page with a RadioButtonList and a PlaceHolder control. The
RadioButtonList's AutoPostBack attribute is set to TRUE and its
SelectedIndexChanged event loads one of three...
|
by: Steve Booth |
last post by:
I have a web form with a button and a placeholder, the button adds a user
control to the placeholder (and removes any existing controls). The user
control contains a single button. I have done all...
|
by: Alan Silver |
last post by:
Hello,
I have a products page that takes a product ID in the query string.
Based on the product details (from a database), the page then loads up
one of a number of custom controls, calls a...
|
by: supvine |
last post by:
Hello,
I am developing a page that has several custom web user controls that
need to be loaded dynamically. Some of the controls are loaded based
on the action (button-click) of a different...
|
by: A.Wussow |
last post by:
Hi Everybody,
i want to load dynamically content from some user controls (with forms,
or some data-controls) using atlas. So i use an UpdatePanel for loading
the user control into a placeholder....
|
by: Andrew Robinson |
last post by:
I have a page that can load a number of different user controls. Each of
these user controls inherits from a common base class and the controls are
loaded based on application state, status, etc...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |