Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Simple DataList Update on PostBack

Reply
Thread Tools

Simple DataList Update on PostBack

 
 
newGuy
Guest
Posts: n/a
 
      07-26-2007
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
<aspataList> 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
 
Reply With Quote
 
 
 
 
newGuy
Guest
Posts: n/a
 
      07-30-2007
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()




"newGuy" wrote:

> 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
> <aspataList> 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

 
Reply With Quote
 
 
 
Reply

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
GridView Update doesn't update on first postback Evan M. ASP .Net 1 04-18-2007 03:32 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Datalist: update a datasource without using select/edit/update Hartmut Schroth ASP .Net 3 12-01-2003 09:54 AM
Simple form postback to update a database Ray Valenti ASP .Net 1 10-27-2003 05:57 PM
Datalist in Datalist How? Gönen EREN ASP .Net 0 08-22-2003 02:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57