I have an ASP.NET web application using C# code. I am trying to insert values
from a web form into an SQL database. I am using SQL COMMAND object for this.
I need to know HOW TO INSERT THE RADIO BUTTON LIST SELECTION entered by the
user in the web form into tha database. for eg. for inserting values from a
text box into the database we write code ::
sqlCommand1.Par ameters["@a"].Value =TextBox1.Text
& for inserting integer values we write::
sqlCommand1.Par ameters["@a"].Value =int.Parse(Text Box1.Text);
But what for a radio button list ? Also, how to insert value into the field
of SQL table whose datatype instead of text is specified as
1. VARCHAR
2. BIGINT (is it same as int.Parse(TextB ox1.Text) )
3. SmallDateTime (is it same as
sqlCommand1.Par ameters["@b"].Value=System.D ateTime.Parse(T extBox1.Text);
Please help.
Thanks
--
pmud
from a web form into an SQL database. I am using SQL COMMAND object for this.
I need to know HOW TO INSERT THE RADIO BUTTON LIST SELECTION entered by the
user in the web form into tha database. for eg. for inserting values from a
text box into the database we write code ::
sqlCommand1.Par ameters["@a"].Value =TextBox1.Text
& for inserting integer values we write::
sqlCommand1.Par ameters["@a"].Value =int.Parse(Text Box1.Text);
But what for a radio button list ? Also, how to insert value into the field
of SQL table whose datatype instead of text is specified as
1. VARCHAR
2. BIGINT (is it same as int.Parse(TextB ox1.Text) )
3. SmallDateTime (is it same as
sqlCommand1.Par ameters["@b"].Value=System.D ateTime.Parse(T extBox1.Text);
Please help.
Thanks
--
pmud
Comment