private bool BindData(string query) { try { String connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); SqlConnection con = new SqlConnection(connectionString); SqlDataAdapter adapter = new SqlDataAdapter(query, con); DataSet ds = new DataSet(); adapter.Fill(ds); studentDetailsView.DataSource = ds; studentDetailsView.DataBind(); return true; } catch { return false; } }
<asp:DetailsView><asp:TemplateField HeaderText="LoginID"> <ItemTemplate> <asp:Literal ID="litLoginID" runat="server" Text=' <%# Eval("LoginID") %> ' /> </ItemTemplate> </asp:TemplateField>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)