Simple DataList Update on PostBack

N

newGuy

Hi,

I have a DataList that displays a column of text boxes that the user can
edit. Instead of having a button with a CommandName within the
<asp:DataList> to submit the page, I have just a regular HTML submit button
elsewhere on the page.

How can I call the DataList's UpdateCommand event on postback in the code
behind when just a regular submit button was clicked?

Thanks,

newGuy
 
N

newGuy

For anyone having this same problem, I came up with an easy
workaround--albeit not as elegant as if it were using the built-in members.

I just added code similar to this in the Page_Load event:

if IsPostBack
methodToIterateThroughDataList()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top