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.
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 |
Explain the purpose of storyboard.targetproperty.
What are Master Pages in ASP.NET?
what are the security certificates used in webservices?
My website has around 100 aspx. Out of this, a certain 20 aspx files should be made available to the users only if they are logged in. How can I achieve this with the web.config file?
Which validator control you use if you need to make sure the values in two different controls matched?
What are the different validators in asp.net?
What is difference between Server.Transfer and Response.Redirect in ASP.NET?
0 Answers Sans Pareil IT Services,
How do you deploy your asp.net application?
From which base class all web forms are inherited?
How ViewstateMac works?
What is parse in asp.net?
Given an ASP.NET Web Form called WebFrom1, what class does the WebForm1 class inherit from by default? a) System.Web.Form b) System.Web.GUI.Page c) System.Web.UI.Page d) System.Web.UI.Form
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)