Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Urgent:Could not find asp:FileUpload control in a template column when adding new row
posted

hi

I am using webgrid with a Ms-Acess database using Oledbdataadapter.

I want to upload two files to the database.I am using asp fileupload control in template columns of the grid for achieving this.

Now the problem is that when a new row is added to the webgrid using Addnewbox template columns dont show the asp fileupload control to upload the files.

Now what do I would do to solve it??

plz help.........

 

 

Parents
No Data
Reply
  • 45049
    posted

    Items in a WebGrid templated column can only be instantiated on the server.

    An easy way to ensure that the grid contacts the server is to handle the grid's AddRow event.  If you don't want a full-page postback, you can wrap your WebGrid in a WARP or an UpdatePanel, so that only the grid is refreshed.

Children
No Data