Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > LoadPostData method called twice

Thread Tools

LoadPostData method called twice

Posts: n/a
Hi Everyone,

I am building an ASP.NET server control. It implements the
IPostBackDataHandler interface. My code contains implementation for
both LoadPostData and RaisePostDataChangedEvent methods. In the
RaisePostDataChangedEvent, I do database updation, insert/update. The
problem is that the LoadPostData method is called twice, once before
the Page Load and once after it. As a result, the
RaisePostDataChangedEvent is also called twice resulting in multiple
insertions in the database. Can anyone suggest a solution to this

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Select method of ObjectDataSource called twice - second post TarTar ASP .Net 4 08-24-2007 06:58 PM
Select method of ObjectDataSource called twice TarTar ASP .Net 0 08-17-2007 05:53 PM
ASP.Net javascript "focus" method needs to be called twice?? TC ASP .Net 3 12-08-2004 05:27 AM
LoadPostData is not called with custom control within datagrid dave ASP .Net Building Controls 0 11-04-2004 02:34 AM
LoadPostData not being called at the right time for controls dynamically added at page load Sam ASP .Net 2 04-26-2004 07:19 AM