0

I need to add a RangeValidator into my ASPX upon runtime. I can create a RangeValidator with:

RangeValidator myval = new RangeValidator();

And add values to it. I can also access items on the page i.e.:

 HtmlTableRow myRow = (HtmlTableRow)Page.FindControl("page1").FindControl("tr-row");
 myRow .Controls.Add(myval);

I cant add a rangevalidator here though as "TR can not accept children controls of this type. Where can I add it? I cant add it to my pages main form as I have ASPX code blocks which will fall over if I use runat=server for the form.

1 Answer 1

1

Add that control to a <td> or to a Placeholder that's in a correct spot.

Sign up to request clarification or add additional context in comments.

1 Comment

Damn, seems logical. Not sure why I even thought I could append it to the TR row... facepalm

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.