CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
Explore    Item Entry    Members   
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 4/27/2007 8:18:03 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 8 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
owen912
Asp.Net User
Dynamically removing child controls of a placeholder.4/27/2007 8:18:03 PM

0/0

I need help with placeholders.

I am working on a form that's dynamically generating from and .ascx file.  The form is getting information on user's vehicles for an insurance quote.  So for a quote on three four cars, the .ascx file is loaded fours times in the placeholder control.  I am trying to add a delete function to the form. So when the user want's to delete vehicle one, I do a ph.Controls.RemoveAt(0) on the postback. 

The problem is when I delete vehicle one, the next vehicle repeat three times.

Example:  I start out getting a quote on a Thunderbird, Mustang, Fairlane and Model T.  I click a button to delete the Thunderbird and when the page loads after the postback, I have three Mustangs.

Can someone point me to a problem (ViewState, etc.)?

 

Zhao Ji Ma - MS
Asp.Net User
Re: Dynamically removing child controls of a placeholder.5/3/2007 11:43:27 AM

0/0

Hi owen912,

Did you mean the second vehicle was displayed three time, however the third and fourth were not displayed.


Zhao Ji Ma
Sincerely,
Microsoft Online Community Support

?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?
owen912
Asp.Net User
Re: Dynamically removing child controls of a placeholder.5/3/2007 10:36:20 PM

0/0

The first vehicle after the one deleted is then repeated over however many are left.  It's kind of ugly, but we've solved the issue by adding logic that remembers what control IDs have been used.

So if you start off with four vehicles the control's ID attributes are rendered something like this: ctl1_txtModel, vctl2_txtModel,ctl3_txtModel,ctl4_txtModel.  Rather than re-numbering, we're forcing the screen to retain the original IDs.  So after deleting vehicle two, the remaining controls are entered like this: ctl1_txtModel, ctl3_txtModel,ctl4_txtModel.  This appears to have resolved the problem.

I am making a mental not to myself not to use the placefolder control in the future.

 

3 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

ng.adobe-macromedia-forums.macromedia-robohelp-general_discussion - Web ... Requirements for RoboSource Control. 2. 6. 3/12/2008 5:52:36 PM ... moving arrow icon in menu control. dynamically removing child controls of a placeholder. ...
recommend e-commerce boxed package - macromedia.dreamweaver - Web ... recommend e-commerce boxed package, > ROOT > NEWSGROUP > Adobe-Macromedia Forums > macromedia.dreamweaver, Date: ... control. dynamically removing child ...
How to: Add PlaceHolder Web Server Controls to a Web Forms Page Add a PlaceHolder Web server control to your page when you want to dynamically add, remove, or loop through controls at run time.
PlaceHolder Web Server Control Overview The Placeholder Web server control enables you to place an empty container control within the page and then dynamically add, remove, or loop through child elements ...
PlaceHolder Control - Expression-web-wiki ... control within the page and then dynamically add, remove, or loop through child ... a PlaceHolder control to your page when you want to dynamically add, ...
Hawkfield.Tech: Comment on Remove SPAN from PlaceHolder Keep in mind, this only works if you're not adding any child controls. ... PlaceHolder control as a container to store dynamically added server controls to ...
Placeholder: Landscape and Narrative In Virtual Environments Each individual controls the color of a logical pixel by turning the wand. ... The Discovery of the Child. New York, Ballantine Books, 1972. © 1948. ...
C# Shiznit - Adding controls dynamically to a page in ASP.NET ... you can dynamically add, update and remove controls, but only ... This is useful when you save some information of the children controls in the viewstate. ...
Preparation Guide for Exam 70-559: Upgrade: MCAD Skills to MCTS Web ... Control the serialization of an object into XML format by ... a Web page by dynamically adding or removing child controls in a Placeholder control at run time ...
TRULY Understanding Dynamic Controls (Part 3) - Infinities Loop You remove form1 from the page (ala placeholder.controls.clear() or something) ... As a rule of thumb should I try to always create dynamic child controls in the ...
Preparation Guide for Exam 70-528: TS: Microsoft .NET Framework 2.0 ... Specify whether events of a control cause a Web Form to ... a Web page by dynamically adding or removing child controls in a Placeholder control at run time. ...
Mike Ormond's Blog : Dynamically Loading ListView Templates Specify an item placeholder by setting a control's ID property to "itemPlaceholder" ... acts as a container so items become children of the LayoutTemplate. ...



user control libraries - interesting use of generics and proxy user controls

problems with security and access to protected files

customizing the required data to register in my website.

where in code is the editable setting for modules?

affiliate referrals

how to add items of the user

problems with enabling iis to delegate requests to remote resoureces

authorization question/confusion. i

need help using session state to track user names

in my web application folder i can't find the webctrl_client where i can copy the runtime folder to

html editor raises exception

file manager and links/document modules do not agree on document root

an easy skin css-mozilla-netscape skin question (i hope)

div scrolling in vs 2008

extending user attributes in the database

vs2003 coexists with vwd2005express?

parser error-unable to load type **.global

formsauthentication.signout()

is there a provider for email notifications ?

re: using multiple sitemaps

 
All Times Are GMT