Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Dynamic refresh of a UserControl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
oaksong - 28 Mar 2008 17:50 GMT
I have an embedded user control based on TreeView that I would like to
refresh dynamically.
The control is in a <div > that's hidden until a specific selection
has been made. Unfortunately the control has already been populated by
the time the user makes the selection, with all of it's info buried in
the State.

I've done quite a bit of research at this point and I'm not finding
this specific functionality. I'm not looking to refresh a couple
nodes, I need to replace the entire tree.

I've looked at controls.add, but that fails with the well known
"Controls collection cannot be modified <%...%>" error.

The page has several UC's which have the standard <%@ reference at the
top of the page. I'm guessing that this is what's causing the problem
as there are no <%='s anywhere.

If someone could point me in a good direction I would much appreciate
it. I've already spent a day on this and it seems like something that
would be rather common place.

tia
Chris
Cowboy (Gregory A. Beamer) - 28 Mar 2008 17:59 GMT
If you need the data to update, you will either have to take a trip to the
server (page refresh) or use something like AJAX. If you want this to appear
seemless, AJAX is your better option. Between the AJAX bits in VS 2008 (or
added to VS 2005) and the AJAX Toolkit (downloadable from codeplex), you can
even build in the visibility aspect.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************

| Think outside the box!

*************************************************
>I have an embedded user control based on TreeView that I would like to
> refresh dynamically.
[quoted text clipped - 20 lines]
> tia
> Chris
oaksong - 28 Mar 2008 20:44 GMT
> I have an embedded user control based on TreeView that I would like to
> refresh dynamically.
[quoted text clipped - 20 lines]
> tia
> Chris

To clarify:

I'm using a dropdownlist to fire a postback, however I've discovered
that the UC refreshes before the click event for the dropdownlist gets
fired.

I need to set some session variables, but I need to know which
dropdownlist control was fired.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.