Solved

Populated Label control inside gridview from outside dropdownlist.

Posted on 2009-07-14
1
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 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