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 IS THE SEQUENCE IN WHICH ASP.NET EVENTS IS PROCEED?

4 Answers  


What are the three parts of an http response?

0 Answers  


What is Http handler?

5 Answers   Accenture,


Describe the sequence of action takes place on the server when ASP.NET application starts first time?

0 Answers   CDC,


Does the following statement executes successfully: Response.Write(?value of i = ? + i);

4 Answers   TCS,


What does postback mean?

0 Answers  


What is the difference between Classic ASP and ASP.Net?

0 Answers  


Can we make activex dll also ti execute in some process as that of client ? How can we do?

0 Answers   DELL, Zerone,


What does setting a control's EnableViewState property to false accomplish?

1 Answers  


How do you construct HtmlResponseMessage?

1 Answers  


what is asp and asp.net ?

2 Answers   Inspira Technologies,


How do you implement postback with a text box?

0 Answers  


Categories