Drop Down List in Details view works locally but not on remote mac

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF1bCBaYW5iYWth?=, Apr 22, 2006.

  1. I have a teamplate field that uses a drop down list in a details view . The
    drop down lit use its own data surce (DataSource 2)
    But I am trying to make the default value from DataSource1 (same as Details
    View)
    Everything works great on my local machine but when I upload to remote server
    This works
    <EditItemTemplate>
    <asp:DropDownList ID="MyField" runat="server"
    DataSourceID="SqlDataSource2"
    DataValueField="MyField" >
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
    ConnectionString="<%$ ConnectionStrings:conCode %>"
    SelectCommand="SELECT [MyField] FROM [MyTable] ORDER BY
    [MyField]"></asp:SqlDataSource>

    But when I bind to Value from Datasource1, it does not work on remote
    machine only. All I did is add this here( SelectedValue='<%# Bind("MyField")
    %>')
    <EditItemTemplate>
    <asp:DropDownList ID="MyField" runat="server"
    DataSourceID="SqlDataSource2" SelectedValue='<%# Bind("MyField") %>'
    DataValueField="MyField" >
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
    ConnectionString="<%$ ConnectionStrings:conCode %>"
    SelectCommand="SELECT [MyField] FROM [MyTable] ORDER BY
    [MyField]"></asp:SqlDataSource>


    Thanks
    Paul
     
    =?Utf-8?B?UGF1bCBaYW5iYWth?=, Apr 22, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy
    Replies:
    1
    Views:
    390
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Jul 11, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,047
    weiwei
    Jan 5, 2007
  3. Jason Wilson
    Replies:
    4
    Views:
    470
    Jason Wilson
    Jan 31, 2007
  4. eeby
    Replies:
    1
    Views:
    137
    Graham Ashton
    Aug 31, 2008
  5. Replies:
    5
    Views:
    295
Loading...

Share This Page