Retrieving postback values of dynamically created RadioButtonList does not work?

Your ListItem definitions seems to me weird.

Your ListItem definitions seems to me weird. Did you try to change them like below.

I do not want to show a Value but I want to add a HTML-attribute which identifies the rating. Data-* is HTML 5 standard for custom-attributes – M. Mimpen Dec 22 '11 at 21:59 Hmm, I am ashamed.It seems that this custom HTML-attribute did mess it... I will have to add the HTML-attribute in another way then.

– M. Mimpen Dec 22 '11 at 22:15 You can also use custom attribute like data-rating="1", but I think Value is required to function properly. – kochobay Dec 22 '11 at 22:25 I did not work when I used the custom attribute so for now I will stick with Value.

The problem with Value is that is shows besides the radio button and that I do not want... – M. Mimpen Dec 22 '11 at 22:35 Try to set "Text" attribute as empty string in ListItem declarations... – kochobay Dec 22 '117 at 9:18.

DataItem is only valid before items are rendered, e. G in DataBinding event. After the post back the repeater rebuilds it's content from ViewState.

One way to keep that property valid is to perform data-binding in Repeater. Init event aspx: ... .... cs: void ActualSurvey_Init(object sender, EventArgs e) { object banks = Cache"ActualSurvey_Banks"; if (banks == null) { banks = new BankManager().GetBanks(); Cache. Insert("ActualSurvey_Banks", banks); } ActualSurvey.

DataSource = banks; ActualSurvey.DataBind(); }.

Ofcourse ActualSurvey is not available in the Ctor of my page. I guess Page_Init would do fine as well? :) – M.

Mimpen Dec 22 '11 at 21:59 You are correct, I've edited my code – alexm Dec 22 '11 at 22:01 It does not work. I do not necessarily have to use DateItem. I want to use the values wich are posted by the form.

– M. Mimpen Dec 22 '11 at 22:04 @M. Mimpen: see my edited version – alexm Dec 22 '11 at 22:06 Ah, I just wanted to post that the event was never triggered – M.

Mimpen Dec 22 '11 at 22:07.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions