473,408 Members | 2,477 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,408 software developers and data experts.

UpdatePanel trigger in different usercontrol.

zb
Scenarion:
In an ASPX page I have a user control embedded (actually embedded in
MasterPage), based on completion of a AJAX call in the user control it
needs to update a Grid view which is actually another user control.

I have been able to do this by keeping the grid view user control
inside an update panel with a hidden trigger button. On my AJAX call
completion in the first user control I use client script to simulate a
click on the hidden button to update the grid view.

But, this is a nightmare especially for maintenance and update. In
actuality, this is no less than a hack!

Is there a better way of doing this?

Thanks.

Nov 8 '07 #1
1 7567
Hi,

Let me see if I understood you correctly.

You have a control in the MasterPage that update the contents of
another control inside the Page contained in the Contents Panel?

IF I understood you correctly the problem with this approach is that
the MasterPage has no way to knowing what's inside the Containing
page, just as well as the Page cannot know what's inside the
MasterPage.

True you can use the Master property, casting it to the desired
MasterPage class and works with all its properties, but the problem
remains that the controls inside the Page cannot (natively) call
methods in the MasterPage.

So the hack you're using is, as far as I'm aware of, the only solution
for your scenario.

Just out of curiosity: Why does this control is in the MasterPage if
it updates the contents of another Page? Usually the MasterPage is
used to provide common functionality through several different pages,
and hardly interacts with the contents pages.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Nov 8, 4:18 am, zb <zey...@gmail.comwrote:
Scenarion:
In an ASPX page I have a user control embedded (actually embedded in
MasterPage), based on completion of a AJAX call in the user control it
needs to update a Grid view which is actually another user control.

I have been able to do this by keeping the grid view user control
inside an update panel with a hidden trigger button. On my AJAX call
completion in the first user control I use client script to simulate a
click on the hidden button to update the grid view.

But, this is a nightmare especially for maintenance and update. In
actuality, this is no less than a hack!

Is there a better way of doing this?

Thanks.

Nov 8 '07 #2

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

Similar topics

0
by: rsdev | last post by:
Hi, I am new to implementing Asynchronous javascript in asp.net (or any framework) and have come across a problem. In a user control I have an accordion with a nested updatepanel, the trigger...
1
by: koraykazgan | last post by:
Hi all, I have a user control (ASCX). In that user control there is a panel, and inside that panel there is a textbox and a button. The panel has a DefaultButton property set, which is set to the...
3
by: JacekDr | last post by:
Hello, I've got the following problem: I want to add and remove dynamically controls to UpdatePanel. In my user control I have a button, but when I click it I get AsyncPostback and Event for...
6
by: Roland Dick | last post by:
Hi, this must have been asked a thousand times, but for some reason I couldn't find anything on this.. I have an ASP.NET 2 website with a masterpage, which contains some navigation links...
1
by: abellix | last post by:
An updatepanel contains a datagrid, this datagrid has columns generated by code-behind: some columns should have async postback, others should have sync postback. Here a sample to reproduce the...
1
by: mohaaron | last post by:
Can anyone tell me how to get a nested UpdatePanel to update when the trigger control is in the parent UpdatePanel and I don't want to parent to update? I'm trying to change the Visible property of...
5
by: Leon Mayne | last post by:
Having a bit of trouble here. I know that if you want to use a fileupload control inside an AJAX update panel then you need to create a trigger for the control that performs the uploading postback...
4
by: pechar | last post by:
Hi All, This question has been asked many times and I've checked most of the sites with resolutions. None worked for me. 1) I have a page which is a content page to a Masterpage . 2) I have a...
9
by: TimVtoo | last post by:
asp VB.NET How can I pass a value to my user controls in the example below From the Master Page?... it's driving me nuts! The scenario: <MasterPage> <UpdateTrigger/> <ContentPlaceHolder...
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
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?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.