Detailsview itemupdating edititemtemplate

So, the method in the code behind page would look like something like this: However, decrypting the data using a templatefield tag posed another problem, extracting new values from the ‘Text Box1’ control.

This will be solved when calling the Item Updating event.

But the image is rendered in a templatefield 's i have a fileupload control .

leting users upload a new picture and thus replace the old one.

I use the new two ways databinding feature Bind(..... the problem here here when a field other then the image is updated , then my image filename is set to its default value (NULL). When the picture is not updated on the details View, it should keep its default value. I have now spende more then 10 hours on trying to achieve this and i therefore need some fresh thought here.

Many thanks in advance JJ The field is probably not re-setting to it's default value it is being set to the value of the control, which if the user doesn't select a new file to upload, is presumably null.

event is raised when an Update button within a Details View control is clicked, but before the update operation.

detailsview itemupdating edititemtemplate-27detailsview itemupdating edititemtemplate-13

Instead when setting the Update Parameters in the codebehind, the control will update the database with the parameter names entered.In my previous article Details View Rich Data Control we have learned how to use Details View using SQLData Source data control... I got many mails about how to use Details View without SQLData Source. Recently I was tasked with encrypting/decrypting some data that could be edited using ASP. Along with the details view control, the legacy code used a SQL Data Source to select and update everything.This means the data access layer was bypassed completely, so any business logic that dealt with encryption on this page had to use a different execution path. The problem could be divided into two tasks: The first task was the easier of the two, as it just involved referencing the encryption library from the code behind page and calling the function inline in the aspx page.While the List View control provides editing support, it requires a bit more work from the page developer to get it going.

You must have an account to comment. Please register or login here!