Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
I try to update GridView but get error
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
NETFAN
19y
1.8k
1
Reply
hi, I try to update a gridview, found million different ways to do it but which one works :s This is the markup code :
Csharp code : protected void Page_Load(object sender, EventArgs e) { string connstring ="Data Source=R2D2\\NETSDK;Initial Catalog=Northwind;Integrated Security=True"; Conn = new SqlConnection (connstring); GridView_Schedule.DataBind(); } protected void Calender_Schedule_SelectionChanged(object sender, EventArgs e) { int day, month, year; string sql; day = Calender_Schedule.SelectedDate.Day; month = Calender_Schedule.SelectedDate.Month; year = Calender_Schedule.SelectedDate.Year; sql = "select * from schedule where Scheduleday='" + day.ToString() + "' and Schedulemonth='" + month.ToString() + "' and Scheduleyear='" + year.ToString() + "'"; SQLDS_Schedule.SelectCommand = sql; GridView_Schedule.DataBind(); } He always claims when I wanna do an update that "@scheduleID" is unknow. If I put it readonly false or visible true , it will work. But I want it to be hidden. It just doesnt look good a gridview with IDs of the records. Is there a way to do this without the ID column visible? Anyone? Thx Kind Regards NETFAN
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Select item on GridView
NEED HELP - books