Solved

Populated Label control inside gridview from outside dropdownlist.

Posted on 2009-07-14
1
384 Views
Last Modified: 2013-12-17
I have a gridview and inside in one column of it a Label control. Also i have a dropdownlist control out of the gridview. I want the selected item in dropdownlist to be appearred in the label inside the gridview.

Any Help would be great!
0
Comment
Question by:nikavak
1 Comment
 
LVL 11

Accepted Solution

by:
Salim Fayad earned 500 total points
ID: 24847653
It would be better to once an item is selected from the dropdownlist, to save this value into the database and then to bind the gridview to the database. This way, your value will be there.
But if you don't want to save it into the database, you can access the label as following:

((Label)(GridView1.Rows[0].FindControl("YourLabel"))).Text = DropDownList.SelectedItem.Text;

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

17 Experts available now in Live!

Get 1:1 Help Now