Bind datasource to textbox or label

Last post 05-14-2008 3:55 AM by Nithila. 2 replies.

Sort Posts:

  • Bind datasource to textbox or label

    05-13-2008, 11:17 PM
    • Loading...
    • Nithila
    • Joined on 03-17-2008, 11:46 PM
    • Posts 31

    Hi,

    I need to check a database value on some condition . One of the condtion is to check the value against another databse values. So that I want to retrieve the second database value in to a textbox or label. I have the following mysqldatasource and want to display that in a textbox or label

    I tried to retrieved and nothing is bound to the textbox.

    I am writing the code in vb.net

    <asp:SqlDataSource ID="dslStatus" runat="server" ConnectionString="<%$ ConnectionStrings:csMySQL_ConNet515%>"

    ProviderName="<%$ ConnectionStrings:csMySQL_ConNet515.ProviderName %>"

    SelectCommand="Select site_id, status_logger from sohevent_logger_tmfo1 order by timestring desc limit 1"></asp:SqlDataSource>

    <asp:SqlDataSource ID="dsmStatus" runat="server" ConnectionString="<%$ ConnectionStrings:csMySQL_ConNet515%>"

    ProviderName="<%$ ConnectionStrings:csMySQL_ConNet515.ProviderName %>"

    SelectCommand="Select site_id, status_main from sohevent_main_tmfo1 order by timestring desc limit 1"></asp:SqlDataSource>

    Thank you.

  • Re: Bind datasource to textbox or label

    05-14-2008, 2:36 AM
    Answer
  • Re: Bind datasource to textbox or label

    05-14-2008, 3:55 AM
    • Loading...
    • Nithila
    • Joined on 03-17-2008, 11:46 PM
    • Posts 31

    Hi mike,

    Thanks for the reply and useful article. I changed the code instead of checking the data values against datbase to application variables.

    I start new thread on state management(application variables). Please follow up if possible.

     

    Thank u.

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter