Hoomqueenue
New Member
In code Behind i have this :\[code\] protected void ButtonSave_Click(object sender, EventArgs e) { Guid guid = (Guid)Membership.GetUser().ProviderUserKey; string name = TextBoxCategoryName.Text; // string user = Membership.GetUser().UserName; this.connection.Open(); command = connection.CreateCommand(); command.CommandText = "insert into ProfitCategories(name, IdUser) values ( '" + name + "', "+guid+" )"; command.ExecuteNonQuery(); connection.Close(); }\[/code\]but this give error: \[code\]Incorrect syntax near 'a8'.\[/code\]how to get GUID from current user and insert into database