public void loadAsset(int id)
 {
     try
     {
         adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();
         admin.TitlesDataTable tbl = title.GetTitle(id);
         if (tbl.Rows.Count > 0)
         {
             txtDescription.Value = tbl[0].datDescription.ToString();
             this.editskip.Value = "2";
         }
     }
     catch (Exception ex) { }
     }
 public void loadAsset(int id)
 {
     try
     {
         adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();
         admin.TitlesDataTable tbl = title.GetTitle(id);
         if (tbl.Rows.Count > 0)
         {
             txtDescription.Value = tbl[0].datDescription.ToString();
             this.editskip.Value  = "2";
         }
     }
     catch (Exception ex) { }
 }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();

        if (!(type == "update"))
        {
            title.InsertTitle(txtDescription.Value);
        }
        else if (type == "update")
        {
            title.UpdateTitle(txtDescription.Value,
                              id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tedit"));
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();

        if (!(type == "update"))
        {
            title.InsertTitle(txtDescription.Value);
         
        }
        else if (type == "update")
        {
           title.UpdateTitle(txtDescription.Value,
                             id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tedit"));
    }