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
Deepak Mishra
NA
109
1.7k
Hidden fields are giving error [hidden field does not exist
Feb 21 2019 4:02 AM
Hidden fields are giving error if I am using in DAL(Data Access Layer) =
hidden field does not exist in current context .
When I am using in single page means, this code in inline page then its working fine.
Please tell me how to pass hidden fields from Presentation Layer to DAL. or Where to write this code so that it will not give the error like (hidden field does not exist in current context .)
protected void btnSave_Click(object sender, EventArgs e)
{
con.Open();
cmd = new SqlCommand("spRegistrationSaveOrUpdate", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@EmployeeId", (
hfEmployeeId.Value == "" ? 0 : Convert.ToInt32(hfEmployeeId.Value)));
cmd.Parameters.AddWithValue("@EmployeeName", txtEmployeeName.Text);
cmd.Parameters.AddWithValue("@Designation", ddlDesignation.SelectedItem.Text);
cmd.Parameters.AddWithValue("@Salary", txtSalary.Text);
cmd.Parameters.AddWithValue("@Email", txtEmail.Text);
cmd.Parameters.AddWithValue("@Mobile", txtMobile.Text);
cmd.Parameters.AddWithValue("@Qualification", ddlQualification.SelectedItem.Text);
cmd.Parameters.AddWithValue("@Manager", txtManager.Text);
int i = cmd.ExecuteNonQuery();
Reply
Answers (
1
)
dynamic content is not show on view source(contrl+U) of page
How to load huge data in entity framework