I use LINQ to Access DB in my Asp.net page.
I have a form with some textbox and a submit button before user see the form all of the textbox be empty with this code:
txtPName.Text =null;
txtPFamily.Text = null;
txtPUsername.Text = null;
txtPPassword.Text = null;
and after click button the values insert in Databse, but if a textbox was empty I want null value insert in database but insert empty in database:
Users u = new Users()
{
FirstName = txtPName.Text,
LastName = txtPFamily.Text,
Username = txtPUsername.Text,
Password = txtPPassword.Text
};
null? For me,nullmeans it has never been set,""means it has been set but left blank intentionally.