Not sure how advisable that is.
It's strongly not recommended. Transactions should be started and committed/rolled back in a single trip to the database, not left open during user interaction. Doing so is asking for severe blocking and deadlock problems.
Worse than closing the browser, imagine if they leave the browser open (with the transaction open), go for a long lunch, don't look at the browser after lunch then go away for a long weekend.
Pradeep, one way you can do this is optimistic concurrency. Assume that in most cases someone else won't want to change the same record. Have the app check the column values when the edit starts and then check them again when the user's done. If there's a difference, then and only then alert the user that someone else has modified the same row they were working on and give them options on how to handle that.
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass