Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Hi,
I am a fresher. i have a problem related to DataGrid .
i have a data grid and i have to place a dropdown in the
datagrid.and i have to retrieve the values from the database
(sqlserver).please tell me any idea about the code.



Hi, I am a fresher. i have a problem related to DataGrid . i have a data grid and i have to place..

Answer / ignatius

put the code inCODEFILE

public DataSet PopulateDDList()
{
string sqlString ="select
emp_name,emp_id from emp_current where
emp_des='"+Des.PM+"'";/*ANY*/
SqlDataAdapter ad = new
SqlDataAdapter(sqlString,new log().db);
DataSet ds = new DataSet();
ad.Fill(ds);
return ds;
}

in the follwing aspx

<EditItemTemplate>

<asp:DropDownList id=DropDownList1 runat="server"
DataSource="<%#PopulateDDList()%>" DataTextField="emp_name"
DataValueField="emp_id">

</asp:DropDownList>

</EditItemTemplate>

Actually this is work well

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What are the components of ado.net?

0 Answers  


What is the difference between client-side and server-side validations in webpages?

0 Answers  


What is view state and how it works in asp net?

0 Answers  


How to use class library reference in asp.net project? Can you give me the example with source Class library haves classes like Database, insert, update, delete, reflection how can i use the database class connection in insert class to insert the record in to the Main Project in asp.net.

1 Answers  


i need code for insert,delete,update adn display records using stored procedure in C#

2 Answers  


we can able to display a MessageBox in asp .net without using any script langages?

8 Answers   ABC,


How do you handle session management in ASP.NET and How do you implement them. How do you handle in case of SQLServer mode?

1 Answers   DELL, Microsoft,


with which controls you worked in Asp.net 2.0?

2 Answers   HP, nTech Solutions,


If i have a page where i create an instance of a dll and without invoking any method can I send values to next page ?

1 Answers   Satyam,


Explain the difference between asp and asp.net?

0 Answers  


What is the difference between Hash table and Array list?

0 Answers  


What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?

0 Answers  


Categories