submitting textbox data from panelbar to sql database

2 posts, 0 answers
  1. Ufuoma
    Ufuoma avatar
    5 posts
    Member since:
    Nov 2012

    Posted 21 Jan 2013 Link to this post


    Please, I am trying to submit data from controls like the textbox to the database from the panelbar containing them.

    The problem is I cannot access the textbox properties in my code behind. Like I am not doing something right.

    Thanks for the anticipated help.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Jan 2013 Link to this post


    I suppose you want to access the controls inside the RadPanelBar. Here is the sample code.

    <telerik:RadPanelBar ID="RadPanelBar1" runat="server">
            <telerik:RadPanelItem Text="RadPanelItem1">
                    <asp:TextBox ID="TextBox1" runat="server" Text="text"></asp:TextBox>

    //accessing the controls
    TextBox txt = (TextBox)RadPanelBar1.FindItemByText("RadPanelItem1").FindControl("TextBox1");

    Hope this helps.

Back to Top