DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    2

    Dynamic User Control Problem

    hi I was curious if anyone has found the solution for Dynamically maintaining ViewState of the Loaded User Control.

    I have a RadioButtonList inside a Panel which is created during design time. Now depending on Option 1, 2 or 3, I am Dynamically Loading the UserControl1.ascx or UserControl2.ascx or UserControl3.ascx respectively.

    The problem is I have to select the option 1 twice to maintain and retreive its value (same for option 2 and 3, have to select it twice to gets its value)

    Can someone help with this with an example in VB.NET

    thanks

    - webc

  2. #2
    Join Date
    May 2005
    Location
    UK
    Posts
    278
    Page.RegisterHiddenField(this.UniqueID + "option", 1);
    where 1 denoted your user control 1

    Now when you select the options radiobutton list use javascript to update this field and retreive with a postback done at the end of the javascript function. I did this when i wrote custom server controls
    Sri

Similar Threads

  1. Replies: 1
    Last Post: 08-18-2005, 01:19 PM
  2. Replies: 0
    Last Post: 08-16-2005, 10:36 AM
  3. Problem with displaying the user control
    By npswarna_13 in forum ASP.NET
    Replies: 0
    Last Post: 06-27-2005, 06:09 AM
  4. Web User Control and javascript
    By s in forum ASP.NET
    Replies: 0
    Last Post: 03-26-2003, 02:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links