To update where I am at now, I have come very far on my application thanks to your help. I am studying up on the LINQ and I can see the advantages you were talking about. I also purchased your ASP.NET 4.5.1 book and the Microsoft Step by step Visual C# 2013 book. These have helped tremendously!
I am stuck though... I was wondering if you can tell me why I return a null value based on the code provided. I am using a gridview with a fileupload control inside the edititemtemplate. I select a record to edit and then go to the cell with the fileupload control and select my file and click a button to upload that file. I always return a null value on the fileupload control.
Here is the code:
ASPX:
Code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Width="1500px" DataKeyNames="Id,Id2,Id3,Id4" BackColor="White" BorderColor="Black" BorderStyle="Solid" BorderWidth="5px" CellPadding="3" GridLines="Vertical" style="text-align: center" PageSize="5">
<AlternatingRowStyle BackColor="Gainsboro" />
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:Button ID="editButton" runat="server" commandname="Edit" text="Edit" Width="60px"/>
<br /><br /><br />
<asp:Button ID="deleteButton" runat="server" CommandName="Delete" Text="Delete" Width="60px" OnClientClick="return confirm('Delete this record?');" />
</ItemTemplate>
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
<EditItemTemplate>
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Id4") %>'></asp:TextBox>
<asp:Button ID="updateButton" runat="server" commandname="Update" text="Update" Width="60px" />
<br /><br /><br />
<asp:Button ID="cancelButton" runat="server" commandname="Cancel" text="Cancel" Width="60px" />
</EditItemTemplate>
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:TemplateField>
<asp:BoundField DataField="ProblemTypePrimary" HeaderText="Primary" SortExpression="ProblemTypePrimary" >
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:BoundField>
<asp:BoundField DataField="ProblemTypeSecondary" HeaderText="Secondary" SortExpression="ProblemTypeSecondary" >
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:BoundField>
<asp:BoundField DataField="ProblemTitle" HeaderText="Title" SortExpression="ProblemTitle" >
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" Wrap="False" />
</asp:BoundField>
<asp:TemplateField HeaderText="Description" SortExpression="ProblemDescription">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Height="250px" Text='<%# Bind("ProblemDescription") %>' TextMode="MultiLine" Width="1168px"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Height="250px" Text='<%# Bind("ProblemDescription") %>' TextMode="MultiLine" Width="1168px"></asp:TextBox>
</ItemTemplate>
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Document Link" SortExpression="FileType">
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Height="50px" Text='<%# Bind("FileType") %>' TextMode="MultiLine" Width="500px"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Height="50px" Text='<%# Bind("FileType") %>' TextMode="MultiLine" Width="500px"></asp:TextBox>
</ItemTemplate>
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Image" SortExpression="Image">
<EditItemTemplate>
<asp:FileUpload ID="FileUpload1" runat="server" /><br /><br /><asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Update Image" /><br /><br /><asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Find Controls" />
</EditItemTemplate>
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# "ImageHandler.ashx?Id4=" + Eval("Id4")%>' GridLines="None" Height="120" Width="120" />
</ItemTemplate>
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:TemplateField>
<asp:BoundField DataField="ProblemTypePrimaryNumb" HeaderText="P Numb" SortExpression="ProblemTypePrimaryNumb" >
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:BoundField>
<asp:BoundField DataField="ProblemTypeSecondaryNumb" HeaderText="S Numb" SortExpression="ProblemTypeSecondaryNumb" >
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:BoundField>
<asp:BoundField DataField="ProblemTitleNumb" HeaderText="T Numb" SortExpression="ProblemTitleNumb" >
<FooterStyle BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BorderColor="Black" BorderWidth="3px" />
<ItemStyle BorderColor="Black" BorderWidth="3px" />
</asp:BoundField>
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" BorderColor="Black" BorderWidth="3px" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" BorderColor="Black" BorderWidth="3px" />
<EditRowStyle BorderColor="Black" BorderWidth="3px" BorderStyle="Solid" />
<PagerSettings Mode="NumericFirstLast" PageButtonCount="50" Position="TopAndBottom" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" BorderColor="Black" BorderWidth="3px" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#0000A9" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#000065" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:sqloitmaineConnectionString %>" SelectCommand="SELECT ProblemTypePrimary.ProblemTypePrimary, ProblemTypeSecondary.ProblemTypeSecondary, ProblemTitle.ProblemTitle, ProblemDescription.ProblemDescription, ProblemDescription.FileType, ProblemTypePrimary.Id, ProblemTypeSecondary.Id2, ProblemTitle.Id3, ProblemDescription.Id4, ProblemTypeSecondary.ProblemTypePrimaryNumb, ProblemTitle.ProblemTypeSecondaryNumb, ProblemDescription.ProblemTitleNumb FROM ProblemDescription INNER JOIN ProblemTypePrimary INNER JOIN ProblemTypeSecondary ON ProblemTypePrimary.Id = ProblemTypeSecondary.ProblemTypePrimaryNumb INNER JOIN ProblemTitle ON ProblemTypeSecondary.Id2 = ProblemTitle.ProblemTypeSecondaryNumb ON ProblemDescription.ProblemTitleNumb = ProblemTitle.Id3"
UpdateCommand="UpdateFourTables" UpdateCommandType="StoredProcedure" DeleteCommand="DeleteFourTables" DeleteCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="Id4" Type="Int32" />
<asp:Parameter Name="Id3" Type="Int32" />
<asp:Parameter Name="Id" Type="Int32" />
<asp:Parameter Name="Id2" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Id4" Type="Int32" />
<asp:Parameter Name="ProblemTitleNumb" Type="Int32" />
<asp:Parameter Name="ProblemDescription" Type="String" />
<asp:Parameter Name="FileType" Type="String" />
<asp:Parameter Name="Id3" Type="Int32" />
<asp:Parameter Name="ProblemTitle" Type="String" />
<asp:Parameter Name="ProblemTypeSecondaryNumb" Type="Int32" />
<asp:Parameter Name="Id" Type="Int32" />
<asp:Parameter Name="ProblemTypePrimary" Type="String" />
<asp:Parameter Name="Id2" Type="Int32" />
<asp:Parameter Name="ProblemTypePrimaryNumb" Type="Int32" />
<asp:Parameter Name="ProblemTypeSecondary" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
CODE BEHIND:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace WebApplication1
{
public partial class crud : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
// This control will search through everything to find a controlid
private Control FindControlRecursive(Control rootControl, string controlID)
{
if (rootControl.ID == controlID) return rootControl;
foreach (Control controlToSearch in rootControl.Controls)
{
Control controlToReturn =
FindControlRecursive(controlToSearch, controlID);
if (controlToReturn != null) return controlToReturn;
}
return null;
}
protected void Button1_Click(object sender, EventArgs e)
{
FileUpload FileUpload1 = (FileUpload)GridView1.FindControl("FileUpload1");
if (FileUpload1 != null && FileUpload1.HasFile) // <<--------- Added to remove the stop from the error because it is always NULL
{
string filename = Path.GetFileName(FileUpload1.PostedFile.FileName); // <<-------NULL Object reference not set to an instance of an object
string contentType = FileUpload1.PostedFile.ContentType;
using (Stream fs = FileUpload1.PostedFile.InputStream)
{
using (BinaryReader br = new BinaryReader(fs))
{
byte[] bytes = br.ReadBytes((Int32)fs.Length);
string constr = ConfigurationManager.ConnectionStrings["sqloitmaineConnectionString"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
TextBox TB5 = GridView1.FindControl("TextBox5") as TextBox;
var currentrecord = TB5.Text;
string query = "INSERT INTO ProblemDescription (Image, ImageName) values (@Data, @ImageName) WHERE Id4=" + currentrecord;
using (SqlCommand cmd = new SqlCommand(query))
{
cmd.Connection = con;
//TextBox TB3 = GridView1.FindControl("TextBox3") as TextBox;
//cmd.Parameters.AddWithValue("@currentrecord", TB5.Text);
cmd.Parameters.AddWithValue("@ImageName", filename);
cmd.Parameters.AddWithValue("@Data", bytes);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
con.Dispose();
}
}
}
}
}
Response.Redirect("crud.aspx");
}
//This will find all controls using a button in the aspx page and dump them to screen so you can find the controlID you need
private void FindAllControls(ControlCollection controls, int depth)
{
foreach (Control control in controls)
{
// Use the depth parameter to indent the control tree.
Response.Write(new String('-', depth * 4) + "> ");
// Display this control.
Response.Write(control.GetType().ToString() + " - <b>" + control.ID + "</b><br />"); if (control.Controls != null)
{
FindAllControls(control.Controls, depth + 1);
}
}
}
// This is the button for the find all controls
protected void Button2_Click(object sender, EventArgs e)
{
FindAllControls(Page.Controls, 0);
}
}
}
When using my button to display all the controls in the page, because I began looking for the missing values when trying to capture the fileupload information this is what I got in return:
> System.Web.UI.LiteralControl -
> System.Web.UI.HtmlControls.HtmlHead -
----> System.Web.UI.HtmlControls.HtmlTitle -
> System.Web.UI.LiteralControl -
> System.Web.UI.HtmlControls.HtmlForm - form1
----> System.Web.UI.LiteralControl -
----> System.Web.UI.WebControls.Image - Image1
----> System.Web.UI.LiteralControl -
----> System.Web.UI.WebControls.GridView - GridView1
--------> System.Web.UI.WebControls.ChildTable -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.TableCell -
--------------------> System.Web.UI.WebControls.PagerTable -
------------------------> System.Web.UI.WebControls.TableRow -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.Label -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
----------------> System.Web.UI.WebControls.DataControlFieldHeaderCe ll -
--------------------> System.Web.UI.WebControls.DataControlLinkButton -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - editButton
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - deleteButton
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox2
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox4
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Image - Image1
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - editButton
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - deleteButton
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox2
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox4
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Image - Image1
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - editButton
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - deleteButton
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox2
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox4
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Image - Image1
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox5
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - updateButton
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - cancelButton
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.WebControls.TextBox -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.WebControls.TextBox -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.WebControls.TextBox -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox1
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox3
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.FileUpload - FileUpload1
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - Button1
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - Button2
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.WebControls.TextBox -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.WebControls.TextBox -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.WebControls.TextBox -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - editButton
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Button - deleteButton
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox2
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.TextBox - TextBox4
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
--------------------> System.Web.UI.LiteralControl -
--------------------> System.Web.UI.WebControls.Image - Image1
--------------------> System.Web.UI.LiteralControl -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
----------------> System.Web.UI.WebControls.DataControlFieldCell -
------------> System.Web.UI.WebControls.GridViewRow -
----------------> System.Web.UI.WebControls.TableCell -
--------------------> System.Web.UI.WebControls.PagerTable -
------------------------> System.Web.UI.WebControls.TableRow -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.Label -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----------------------------> System.Web.UI.WebControls.TableCell -
--------------------------------> System.Web.UI.WebControls.DataControlPagerLinkButt on -
----> System.Web.UI.LiteralControl -
----> System.Web.UI.WebControls.SqlDataSource - SqlDataSource1
----> System.Web.UI.LiteralControl -
> System.Web.UI.LiteralControl -
I hope you might let me know where and why I am failing to read the FileUpload control and how to capture it.
Thank you again for all your help!
