473,472 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GetTheText\TemplateField

gh
Below is the code for my GriView Columns. When the user clicks the
update button I am going to need to get the value of the FileUpload text
box, for the edited row. I was thinking of using the RowUpdating event
for this. How do I get at the FileUpload Text.

TIA

<Columns>
<asp:BoundField readonly="True" datafield="ExternalId"
sortexpression="ExternalId" headertext="ExternalId"></asp:BoundField>
<asp:BoundField datafield="PhotoID"
sortexpression="PhotoID" headertext="PhotoID"></asp:BoundField>
<asp:BoundField datafield="PhotoDate"
sortexpression="PhotoDate" headertext="PhotoDate"></asp:BoundField>
<asp:BoundField datafield="Description"
sortexpression="Description" headertext="Description"></asp:BoundField>
<asp:BoundField datafield="Notes" sortexpression="Notes"
headertext="Notes"></asp:BoundField>
<asp:BoundField datafield="Photographer"
sortexpression="Photographer" headertext="Photographer"></asp:BoundField>
<asp:BoundField datafield="PhotographerWebsite"
sortexpression="PhotographerWebsite"
headertext="PhotographerWebsite"></asp:BoundField>
<asp:BoundField datafield="PhotoPath"
sortexpression="PhotoPath" headertext="PhotoPath"></asp:BoundField>
<asp:TemplateField headertext="Select File">
<ItemTemplate>
<asp:FileUpload id="FileUpload1"
runat="server"></asp:FileUpload>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField showeditbutton="True"></asp:CommandField>
</Columns>
Sep 27 '07 #1
1 1217
http://www.dotnetspider.com/kb/Article2098.aspx

From link above.

If there is only a single file control then we can use the PostedFile
property of the file control to upload files.
This property is of type HttpPostedFile class and contains the following
methods and properties which aids file uploading.
FileName -- Returns the full path and name of the uploaded file.
ContentType -- Returns the full path and name of the uploaded file
ContentLength -- The size in bytes of the uploaded file.
Methods used are SaveAs(Path) Saves the uploaded file to the specified path.
First paste this inside form tag for file field
"gh" <gh@att.netwrote in message
news:uS**************@TK2MSFTNGP06.phx.gbl...
Below is the code for my GriView Columns. When the user clicks the update
button I am going to need to get the value of the FileUpload text box, for
the edited row. I was thinking of using the RowUpdating event for this.
How do I get at the FileUpload Text.

TIA

<Columns>
<asp:BoundField readonly="True" datafield="ExternalId"
sortexpression="ExternalId" headertext="ExternalId"></asp:BoundField>
<asp:BoundField datafield="PhotoID" sortexpression="PhotoID"
headertext="PhotoID"></asp:BoundField>
<asp:BoundField datafield="PhotoDate" sortexpression="PhotoDate"
headertext="PhotoDate"></asp:BoundField>
<asp:BoundField datafield="Description" sortexpression="Description"
headertext="Description"></asp:BoundField>
<asp:BoundField datafield="Notes" sortexpression="Notes"
headertext="Notes"></asp:BoundField>
<asp:BoundField datafield="Photographer" sortexpression="Photographer"
headertext="Photographer"></asp:BoundField>
<asp:BoundField datafield="PhotographerWebsite"
sortexpression="PhotographerWebsite"
headertext="PhotographerWebsite"></asp:BoundField>
<asp:BoundField datafield="PhotoPath" sortexpression="PhotoPath"
headertext="PhotoPath"></asp:BoundField>
<asp:TemplateField headertext="Select File">
<ItemTemplate>
<asp:FileUpload id="FileUpload1" runat="server"></asp:FileUpload>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField showeditbutton="True"></asp:CommandField>
</Columns>

Sep 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Noyb | last post by:
How do I convert a string into a value I can upload to mysql date field. Specifically, I have a user select a month, day and year from drop-downs, then I want them submitted to one date field....
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.