Solved

Populated Label control inside gridview from outside dropdownlist.

Posted on 2009-07-14
1
404 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

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

635 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