Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Access DataList Fields?Access DataList Fields?
Previous
 
Next
New Post
4/1/2008 4:04 PM
 

I apologize. May have been some sloppy copy/pasting.  Both are ModuleName_SelectAll within live testing code.

 
New Post
4/1/2008 5:29 PM
 

old Mac,

do you have this:

 

Protected Sub SetModuleId(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) Handles ObjectDataSource_ModuleName.Selecting

    e.InputParameters("ModuleId") = ModuleId.ToString

End Sub

in your View.VB code file?

-- Nathan Rover

 

 
New Post
4/1/2008 8:16 PM
 



Nathan,

Success!  Appreciate your feedback.
Interestingly enough, this standard ModuleID Sub was not included in this testing.  Although, upon examining the rest of the coding, I found a certain doubled class that was the main cause for the error.  Although I did find a bunch of developers out there who have encountered this error in other regards:  http://geekswithblogs.net/chrishan/archive/2005/07/13/46223.aspx

To recap, the DataList can be accessed either through codebehind with conversion from integer to string or by controller, which requires ObjectDataSource.  The more options for developing, the better.  I will now work with UPDATING & DELETING stored database values a to ensure the controller is working properly together with DataList.

 
New Post
4/1/2008 8:57 PM
 

Congrats on figuring it out, glad to help. Don’t know if you’ve seen this site:

http://it.maconstate.edu/tutorials/ASPNET20/default.htm

You might find some useful pointers to help with the updating and deleting…

More specifically this page: http://it.maconstate.edu/tutorials/ASPNET20/ASPNET09/aspnet09-08.aspx  

-- Nathan Rover

 
New Post
4/1/2008 9:10 PM
 



Because the UPDATE & DELETE functions are also included within controller, retrieving values according to selected DataList items within ASCX can get tricky. 
The DataList is binding using the following:  

ASCX
FieldName: <asp:TextBox ID="TextBox1" runat="server" Text=<%# Bind("FieldName") %> Visible="true"></asp:TextBox>

CONTROLLER
<DataObjectMethod(DataObjectMethodType.Update)> _
Public Shared Sub TableName_Update(ByVal ModuleNameInfo As ModuleNameInfo)
DataProvider.Instance().ExecuteNonQuery("ModuleName_Update", ModuleNameInfo.ID, ModuleNameInfo.ModuleId, GetNull(ModuleNameInfo.PortalID.ToString), GetNull(ModuleNameInfo.UserID.ToString)) ...etc.
End Sub

Within the DataList Template, there is a Update button:
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update"></asp:LinkButton>


Including the code:  CommandName = "Update"  or CommandName = "ModuleName_Update"  just isn't enough.  Although the DataList is databound, it makes sense the update is not occuring, since the controller does not reference DataList values.  Using the initial post response would convert value from integer to string, but values and code is not defined or recognized from within controller.  So it seems to be a question of associating the DataList items with controller values, and of course relative only to the selected update ID.

* Just saw the post above.  Possibly may find answer within.  Keep all posted.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Access DataList Fields?Access DataList Fields?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out