Question

i am developing application and i have set some html control which are runat="server" on code behind i need to change there text,i made htmlcontrol[] array which contain those control now the problem which i am facing that it didn't showing my text property so that i can change there text dynamically my code is

HtmlControl[] htmlctrl = { ctl1,ctl2,ctl3,ctl4 };

        foreach (HtmlControl ctl in htmlctrl)
        {


        }

Can anyone help me out.

Was it helpful?

Solution

you must type-cast html-control (which is textbox) to TextBox, in order to get Text property shown.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top