Thursday, May 31, 2012

Check Exist or not

 String qryChkExist = "SELECT isnull(column_name,'') as Article_alias from Table_Name where column_name='" + txtalias.text.tostring().trim()+ "'";

 String ChkRecord = (String)SqlHelper.ExecuteScalar(ConnectionString, CommandType.Text, qryChkExist);
        if (ChkRecord != null)
        {
            if (ChkRecord != "")
            {
                lblMsg.Text = "Another Alias with this Name already exists. Please choose another Alias.";
                return;
            }
        }

1 comment:

  1. Give me the complete Example of source code
    Give me Example In a table Email,Username Are unique
    Enter Username(oR)Email Already exist in DB Tell me Already Exits
    Plz send me complete source code
    My mail Id:mandla.anilbabu@gmail.com

    ReplyDelete