TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hajinder Jassal
NA
19
7.7k
textbox value doest not inserted in asp.net
Nov 5 2015 12:58 PM
this is my code. i am inserting the value in database.but topic column is always empty userby and date is inserted properly. tell me what i have to do so that all the values can be inserted.
try
{
cn.Open();
string sql1 = "insert into Topics(Topic,UserBy,Date)values('" + TextBoxScrap.Text + "','" + Session["uname"].ToString() + "','" + DateTime.Now.ToString() + "')";
SqlCommand cmd = new SqlCommand(sql1, cn);
cmd.ExecuteNonQuery();
cn.Close();
TextBoxScrap.Text = "";
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
Reply
Answers (
6
)
getting hits on asp.net application
jquery and angularjs