Forum Moderators: open
strSQL = "Select Salary From Employees where EmployeeId=" & empid
And someone types
1 or 1=1
into the field. Now the query doesn't return just one record, it returns all of them. Parameterized queries is always the way to go.
Next two questions:
The button must be clicked to post the form. Is there a way to press the enter key and have it submit like in regular HTML and ASP?
Is there a way to make a warning before deleting a line from a datagrid? (other than onClick javascript)
There will be millions more questions as I get involved in .NET. I like it so far.
A lot of things to add client-side events or properties to asp controls is done with the yourcontrol.attributes.add method...so take a look at how to use that.
4GuysFromRolla has about 12 articles on how to use the datagrid that are very good for learning common tasks.