source code

<%@ Page Language="C#" MasterPageFile="~/MasterPage/Admin.master" AutoEventWireup="true" CodeFile="UpdateTask.aspx.cs" Inherits="AdminModule_Default" Title="Untitled Page" %>






   

   
       
       
       
   
   
   
 

   
   
   
   
       
     
   
    
       
           
               
                 
               
               
                    
               
               
                   
                  
                   
                   
                   
                   
               
               
               
               
               
               
               
               
               
               
               
          
               
                   
                   
               
     

                       
                   

                       
                   

                                                    style="font-weight: 700; font-size: 11px; font-family: Arial, Helvetica, sans-serif"
                            Text="Project">

                   

                                                    onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                       

                   

                                            CellPadding="4" ForeColor="#333333" GridLines="None"
                        onrowcommand="GridView1_RowCommand1" onrowediting="GridView1_RowEditing1"
                        onrowupdating="GridView1_RowUpdating1" Width="219px">
                   
                       
                       
                   
                    
              
     
              
              
              
                 
                     
                         
                     

                     
                         
                     

                 

                 
                     
                         
                     

                     
                         
                     

                 

             
                 
                   
                     
                                                        CommandName="Edit" Text="Edit">
                     

                   

         
                     
                     
                                                        CommandArgument='<%#bind("Task") %>' CommandName="update" Text="Update">
                             
                             

                             

                             
                         
             
             

                       
                       
                       
                       
                       
                   

               

               
               
               

               
                                                     Text="Button" />
                   

      

          









code.aspx.cs







using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class AdminModule_Default : System.Web.UI.Page
{
    REMO obj = new REMO();
   protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            clnt();
           // details();
            MultiView1.Visible = true;
            MultiView1.SetActiveView(View1);
        }


    }

    private void clnt()
    {
        ListItem li = new ListItem();
      
        string qr = "select ProjectTitle from ClientDetails";
        DataSet ds = new DataSet();
        ds = obj.GETDS(qr);
         DropDownList1.DataSource = ds.Tables[0];
        DropDownList1.DataValueField = ds.Tables[0].Columns["ProjectTitle"].ToString();
        DropDownList1.DataBind();
        li.Text = "Choose";
       
        DropDownList1.Items.Insert(0, li);
    }


    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
    
        details();

    }


    private void details()
    {
        try
        {
            string qre = "select Modules,Task from ClientDetails where ProjectTitle ='" + DropDownList1.SelectedItem.ToString() + "'";
            DataSet ds = new DataSet();
            ds = obj.GETDS(qre);
            if (ds.Tables[0].Rows.Count != 0)
            {
                GridView1.DataSource = ds;
                GridView1.DataBind();
            }
            else if (ds.Tables[0].Rows.Count == 0)
            {
              lbgrdvs.Text = "There is No Module in the List";
            }
            else
            {
               lbgrdvs.Text = "There is No Module in the List";
            }

        }
        catch (Exception e)
        {
            throw e;
        }
    }

 
    protected void Button1_Click(object sender, EventArgs e)
    {
       

    }
    protected void GridView1_RowUpdating1(object sender, GridViewUpdateEventArgs e)
    {
        GridViewRow grds = GridView1.Rows[e.RowIndex];
        TextBox tmle = (TextBox)grds.FindControl("ttmle");
        TextBox taskg = (TextBox)grds.FindControl("txttsk");
        //  Label lb = ((Label)grds.FindControl("lblmdule"));
        DropDownList ddl = ((DropDownList)grds.FindControl("DropDownList1"));

        string qer = " update ClientDetails set Modules='" + tmle.Text;
        qer += "',Task='" + taskg.Text;
        qer += "' where  ProjectTitle='" + DropDownList1.SelectedItem.ToString();
        qer += "'";
        obj.Insert(qer);
        GridView1.EditIndex = -1;
        details();

       
    }
    protected void GridView1_RowEditing1(object sender, GridViewEditEventArgs e)
    {

        GridView1.EditIndex = e.NewEditIndex;
        details();
    }


    protected void GridView1_RowCommand1(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Edit")
        {
            string temp = Convert.ToString(e.CommandArgument);

        }

    }
}








in this i increase the modules and task .if the modules is completed i need to show the message as status is completed .