views:

1090

answers:

1

At the moment I have something like this `

<%# Eval("orderBy").ToString()%>)

<%# Eval("question").ToString()%>

" type="radio" id="True" value="True" class="styled" />

" type="radio" id="False" value="False" class="styled" />

` And in the code behind I caputure the values as Request.Form("question1") for example and this all works fine

Now I am wondering how to add validation to this, I think i have to change to asp Radio Button control but i cant see how i could add my dynamic radiobutton names in there with my id from stored procedure.

Also I would like to add the validation to the top of the screen as a validation summary

Any Ideas ?

A: 

Look into Validation Server Controls.

Kon
Yes I know I have to use Validation Controls.As I stated in my question I was asking how to move from<input name="question<%# Eval("orderBy").ToString()%>" type="radio" id="True" value="True" class="styled" />To an asp radiobutton. I.e im not sure how to add validation to dynamic contr
I would suggest you get away from rendering your control like that, and instead do it all in the code-behind by create an instance of the control and adding it to a placeholder's Controls collection.
Kon
I second Kon. Creating a control from the code-behind and adding it to a container would give you option to set a lot of properties at runtime.
Srikanth Venugopalan