473,323 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

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

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
Apr 22 '06 #1
0 1134

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dan | last post by:
This is one that has me stumped and I need an expert's input. Any ideas why the values from the second script-generated drop down list isn't recognized by the script to add time values to the...
0
by: Dec | last post by:
Ok to simplify things I'll just give an example. This is pretty much what I want to do (minus the postcode): http://www.perrys.co.uk/usedcar?ID=F5J9BNNBMVK00DF I have relatively little...
1
by: Dec | last post by:
Ok to simplify things I'll just give an example. This is pretty much what I want to do (minus the postcode): http://www.perrys.co.uk/usedcar?ID=F5J9BNNBMVK00DF I have relatively little...
2
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of...
1
by: craig | last post by:
Hi, I've been asked to create a page that dynamically populates the contents of related drop down lists using JavaScript, and then obviously posts things back to the server. For completeness,...
2
by: Dave A | last post by:
I am stuggling with databinding a drop down list, hooking into the SelectedIndexChanged and attempting to avoid using the viewstate. The drop down list is quite large so I would prefer to avoid...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
2
by: McGeeky | last post by:
Hi. I have a read only GridView. For each row I want to display a drop down list which contains a list of actions the user can select from for that particular row. E.g. "view details". When they...
1
by: yasminussain | last post by:
Hi to all, I have written one jsp file. In that file, I have one drop down which contains list of request name (like student name) based on the selected value within drop down I will display the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.