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

G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top