Original Post
Hello everyone, I've been having a hell of a time working with postbacks lately. I've found an enormous amount of information but none that either a.) speak directly to my problem or b.) make sense at all. My project is as follows: I have a custom control I created that simply takes in a variable of x data type and depending on the type, renders a control and label on the screen. For example, if they pass in a string data type that represents someones first name it will say "First Name:" on the label and put an empty text box next to it. Or if it was a datetime data type it would say "Date:" and have a calendar control next to it. etc etc. My problem is, I can not get the control to retain it's value on postback. It always resets no matter what I try. Perhaps I'm not understanding the way it all works (this is the first control I've designed). I've read multiple articles saying to use the RaisePostBackEvent but none of them explain it well enough for me to understand. Can anyone point me in the right direction? You guys are always an awesome help!