<asp:FormView ID="fvFileUpload" runat="server" Width="418px"> <ItemTemplate> <asp:Label ID="lblFileId" Text="File ID" runat="server" Width="120px" /> <asp:TextBox ID="txtFileID" runat="server" /> <br /> <asp:Label ID="lblFileName" Text="File Name" runat="server" Width="120px" /> <asp:TextBox ID="txtFileName" runat="server" /> <br /> <asp:Label ID="lblFileKey" Text="File Key" runat="server" Width="120px" /> <asp:TextBox ID="txtFileKey" runat="server" /> <br /> <asp:Label ID="lblUpload" Text="File Upload" runat="server" Width="120px" /> <asp:FileUpload ID="fupload" runat="server" /> <br /> <asp:Label ID="lblUplodedBy" Text="File Owner" runat="server" Width="120px" /> <asp:TextBox ID="txtOwner" runat="server" /> <br /> <br /> <asp:Button ID="btnReq" Text="Requset to Auditor" runat="server" OnClick="btnReq_Click" /> <asp:Button ID="btnClear" Text="Clear" runat="server" Height="25px" OnClick="btnClear_Click" Width="150px" /> </ItemTemplate> </asp:FormView>
private void FileIDGen() { string FileID = crudobj.SelectFileId(); ((TextBox)fvFileUpload.FindControl("txtFileID")).Text = FileID; // im getting error here but im getting FileId string value as File1. the problem occurs when it tries to assign that value to the textbox }
TextBox txtproFileID = (TextBox)fvFileUpload.FindControl("txtFileID"); txtproFileID.Text=FileID;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)