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
narasiman rao
NA
519
768.3k
dropdownlist selected value is not saved in the database
Aug 11 2015 11:34 PM
In run mode as follows
Name textbox1
Designation Courseofficer (Dropdownlist)
Prinicpal
Director
Save(Buuton)
in the designation column three values are there in the dropdownlist
When user type the name ram in textbox1 and select the designation from the dropdownlist.
Suppose i am selecting the Courseofficer from the dropdownlist and click Save button records are saved.
but i am selecting the courseofficer from the dropdownlist only. But in database
last value Director is saved in the database.
Save button code as follows
Sql = "insert into Designations values('" + txt_name.Text + "','" + ddldesg.SelectedValue.ToString() + "')";
SCon.ExecSql(Sql);
LblErr.Text = "Record Inserted Successfully";
SCon.Con.Close();
In database records as follows
ID Name Designations
1 Ram Director
please help me what is the problem in my above code.
Reply
Answers (
6
)
Saving array inside other array
a nullable exception occure using Frame.NavigateTo