Solved

ASP.NET + LINQ + DropdownList

Posted on 2013-07-01
2
546 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Initial get page response times and IIS8 15 51
Media.Imaging 1 18
in Dot net,lastest version of MVC 3 24
HttpPostedFile 1 26
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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