<asp:GridView ID="MailshwGRDVIW" runat="server" HeaderStyle-BackColor="#ffc809" BorderStyle="None" AllowPaging="true" AlternatingRowStyle-BorderStyle="None" HeaderStyle-ForeColor="White" Width="600px" HeaderStyle-Height="25px"> </asp:GridView>
if (Session ["UsrNme"] != null) { string UsrNme = Convert.ToString(Session["UsrNme"]); DataTable MailshowDT = new DataTable(); SqlConnection MailshowCon = new SqlConnection(); String MailshowSQL = "SELECT sender, Mestitle, Date FROM mails WHERE ([Receiver] = @Receiver)"; using (SqlDataAdapter MailshowDA = new SqlDataAdapter(MailshowSQL, sc)) { MailshowDA.SelectCommand.Parameters.AddWithValue("@Receiver", UsrNme); MailshowDA.Fill(MailshowDT); } MailshwGRDVIW.DataSource = MailshowDT; MailshwGRDVIW.DataBind(); }
<Columns> <asp:TemplateField HeaderText="headettext" > <ItemTemplate> <asp:CheckBox ID="myCheckBox" runat="server" /> </ItemTemplate> </asp:TemplateField> </Columns>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)