View Single Post
  #1 (permalink)  
Old July 21st, 2007, 11:21 PM
rsearing rsearing is offline
Friend of Wrox
 
Join Date: Jul 2006
Location: olathe, ks, USA.
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default Programatically Change Paramet Of ObjectDataSource

I have a GridView that points to an ObjectDataSource.
This ObjectDataSource's update method is:

Public Shared Function Upsert(ByVal myPaintingType As PaintingType) As Integer
    Return PaintingTypeDB.Save(myPaintingType)
End Function

Where myPaintingType is, obviously, my own object that has one field called "url".


My problem is that I have chnaged the "URL" column of the Gridview to a template so that I can change the "editItemTemplate" of URL to have a FileUpload control. I cannot figure out how to programatically change the "url" property of my object to the filename of the fileupload.

(Typically, you would have a textbox that "Binds" to the URL value--but I am deleting the textbox and putting the fileupload)

I have created a "Sub" in the codebehind of the page to try to capture the Gridview1 updating or the ObjectDataSOurce updating functions..but I don't know how to take the filename from the fileupload and put into the object that is being passed to the update method of my business layer.

Please help.

Kind Regards,
Rob


Reply With Quote