In a previous article, I wrote about how to customize list forms.
Today I’ll talk about 3 things about custom forms.
1) How to get the current item
To retrieve the current itemyou have to go through the itemcontext of ListFormWebPart
2) Close the form.
At the end of my button click, I used the following three lines to close the popup and refresh the calling page.
3) Associate an event to a button
Doing my development, I noticed a strange thing when I tried to add a button.
In my custom page, I set the button as follows.
My function was defined in my code behind but when I click on button, my code behind was never executed!
To avoid this, I attached my event in the “onload” of the page, and since it works perfectly.
Hope this help !