I am calling userid by emailid and the user id sql server identity column code in DAL
public static string GetUserIdByEmailID(ProfileMasterBLL profileMasterBLL)
{
int userId=0;
SqlConnection con4 = Generic.DBConnection.OpenConnection();
ProfileMasterBLL bll=new ProfileMasterBLL();
try
{
string sql = string.Format("Select UserId from Profile_Master where EmailID='{0}'",bll.EmailID );
SqlCommand cmds=new SqlCommand(sql,con4);
cmds.ExecuteNonQuery();
}
catch (Exception ex)
{
throw ex;
}
return userId.ToString();
this is my code in UI
if (result > 0)
{
Session["EmailID"] = TextBox8.Text;
value =Profile ...
Go to the complete details ...