Hi all,
   
  I' m building a mail functionality where a registered user can post a message 
to another registered user.I m storing all the values in a database and when 
the user enters into his inbox, the mails which are in his name will be 
displayed. i ve done this using datagrid. Now i need to add a checkbox to each 
and every message that is displayed and that checkbox shoul ve the messageid 
value also.
   
  inbox.aspx
   
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="inbox.aspx.cs" 
Inherits="inbox" %>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
  <html xmlns="http://www.w3.org/1999/xhtml"; >
  <head runat="server">
  <title>Untitled Page</title>
  </head>
  <body>
  <form id="form1" runat="server">
  <div>
  <asp:GridView ID="DataList1" runat="server">
  </asp:GridView>
  </div>
  </form>
  </body>
  </html>
   
  using System;
  using System.Data;
  using System.Configuration;
  using System.Collections;
  using System.Web;
  using System.Web.Security;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;
  using System.Web.UI.HtmlControls;
  using System.Data.SqlClient;
  public partial class inbox : System.Web.UI.Page
  {
  protected void Page_Load(object sender, EventArgs e)
  {
  string user;
  user = Session["User"].ToString();
  SqlConnection con = new 
SqlConnection("server=localhost;database=Northwind;uid=sa;pwd=server;");
  string query = "select messageid,messagefrom,mailsubject,receivedtime from 
mailsreceived where mailto='" + user + "'";
  SqlCommand cmd = new SqlCommand(query, con);
  SqlDataAdapter adap = new SqlDataAdapter(cmd);
  DataSet ds = new DataSet();
  adap.Fill(ds, "Mails");
  DataList1.DataSource = ds.Tables["Mails"];
  DataList1.DataBind();
  }
  }


                        
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to