I have a form having label Pid AND GIVE value against it in tetxtbox problem is this that i set Pid as primary key and every time i must enter unique value i want when i run the form value in textbox increment automatically and on submit button click it save in db
One way is to use the Auto increment
Other way is to get the Max id + 1 like this
SELECT MAX(Id) + 1 as MaxId FROM Table1
Whenever the page is loaded select get the Max id and set it to TextBox.
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.