Solved

ASP.NET + LINQ + DropdownList

Posted on 2013-07-01
2
544 Views
Last Modified: 2013-07-03
I have populated my dropdownlist binding them to a LINQ datasource, without codebehind is there a way to select one of the values as the selected value, or if not add a value to the dropdownlist as the selected value.
0
Comment
Question by:dkilby
2 Comments
 
LVL 8

Accepted Solution

by:
Arabia_vn earned 500 total points
ID: 39294252
Then you have to set it from client side by using javascript, something like this

    <script type="text/javascript">
        document.getElementById('<%= ddlExample.ClientID %>').selectedIndex = 2;
    </script>
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 39294257
Hi,

I don't think it possible, with out using Code behind!

Hope it helps u...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I use SQL Stored Procedure to return FedEx Zone 17 41
Get id from json Data with NewtonSoft 3 31
DateTimepicker 4 33
Remove greater than sign 3 41
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now