2

I saw a few posts in here that got me pointed in the right direction, but I think my issue is unique.

I have a user control that I want to add every time the Add button is clicked. I got that part working by verifying the button was clicked on postback, incrementing a counter, then looping through the counter on Page_Load to add the controls to my placeHolder.

I have two challanges left.

  1. How do I hold the values that were previously entered into the user control?

  2. My control conatins a series of images that are based on user input. These images are affected by JavaScript functions inside he control. So let's say I am changing a default image called default.gif. This works fine for the first control added, but the

1 Answer 1

4
  1. You must ensure that your UserControls get the same ID on every postback. On that way you ensure that the ViewState loads correctly to retain values across postbacks and to trigger events
  2. You must provide more informations and code for your second part of the question
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.