i have a problem in save the html textarea value in database. I add that HTML textbox in asp.net page due to some extra event in HTML textarea.
my ASP code is that
textarea id="COMMENTS" rows="2" cols="20" onKeyDown="textCounter(this.form.COMMENTS,this.for m.remLen,200);" onKeyUp="textCounter(this.form.COMMENTS,this.form. remLen,200);" onFocus="this.style.backgroundColor='#FFF9EC'" onBlur="this.style.backgroundColor='#ffffff'"></textarea>
<input type="text" name="remLen" size="3" maxlength="3" value="200" readonly> <span class="catcntsml">Char count</span>
and i want to add in that query to sql database
SqlConnection conn = new SqlConnection(connstr);
strsql = "insert into contactus values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + COMMENTS.textarea + "')";
SqlCommand cmd = new SqlCommand(strsql, conn);
conn.Open();
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
conn.Close();
plz solve my problem.....
THANX
Bookmarks