locked
access devicespecific element RRS feed

  • Question

  • User596824466 posted

    Hi,

    I'm trying to add a bigger textinput box to one page. The code looks like this:

    <mobile:DeviceSpecific ID="device1" Runat="server">
                    <Choice Filter="isHTML32">
                        <ContentTemplate>
                            <asp:TextBox ID="TextBox2" Rows="2" Columns="20" TextMode="MultiLine" runat="server"></asp:TextBox>
                            <br />
                        </ContentTemplate>
                    </Choice>
                    <Choice Filter="isXHTML">
                        <ContentTemplate>
                            <asp:TextBox ID="TextBox2" Rows="2" Columns="20" TextMode="MultiLine" runat="server"></asp:TextBox>
                            <br />
                        </ContentTemplate>
                    </Choice>
                    <Choice Filter="isWML11">
                        <ContentTemplate>
                            <mobile:TextBox ID="TextBox1" Runat="server"></mobile:TextBox>
                        </ContentTemplate>
                    </Choice>
                </mobile:DeviceSpecific>

     It compiles ok but I'm unable to access the new elements (like TextBox2.Text). What am I missing? Is there another way?

     thanks,

    Otto
     

    Friday, February 16, 2007 8:49 AM

Answers

  • User596824466 posted
    I found it. By browsing the controls collection a bit deeper it turns out that the ID was now actually called "ctl00$TextBox2".
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 16, 2007 11:12 AM