file upload - VB.NET Custom SqlFactory, FileUpload Control issue -
I So basically I want to save my lines This is part of my thoughts :. Note: I know that FileUpload does not work in Edit: I also have a lot of things, and I have suffered a lot. Code> tried to work around the form , nothing came from my server side Fixed The code must be set as a full post with the code SqlFactory to build my StoredProcedures class to control , And I'll use it for all transactions between the application and SQLServer. The file that I have applied lastly is a file upload. But it will not work as it should be :( I searched around the web, can not be found too much. Report with name , description , and image . Names and details are working perfectly, but due to some reason this file will not be uploaded, then this code will be uploded Do not reach for that:
And if fuImage.PostedFile is nothing OrElse String.IsNullOrEmpty (fuImage.PostedFile.FileName) OrElse fuImage.PostedFile.InputStream nothing and nothing dim imagebytes (fuImage.PostedFile.InputStream.Length) byte fuImage.PostedFile.InputStream.Read (imagebytes, 0, imagebytes.Length) rep.FuImage = imagebytes then upload as representatives end .Name = txtName.Text rep.Description = txtReportContent.Text repFac.Save (representatives) rep.FuImage = imagebytes and down those if Statements are my factory line, so do the work It should, but it FuImage FileUpload never control that should be selected to recognize a file
& lt; Asp: FileUpload id = "fuImage" runat = "server" CssClass = "fontChange" /> & Lt; ASP: RegularExpressionValidator id = "rExpImage" runat = "server" ControlToValidate = "fuImage" Error = "Only .gif, .jpg, .png, .tiff and .jpeg" ValidationExpression = "(* \ ([Gg ..] [ Ii] [ff]) |. * \ ([Jj] [pp] [gg]) | ... * \ ([BB] [Mm] [PP]) | .. * \ ([PP] [ Anaan] [GG]) |. *. ([TT] [II] [II] [FF] $) "validation group =" Riportwalideteshn Somuri "CSS class =" failure information "& gt; * & lt; / asp: RegularExressianWaleneteter & gt; asp: UpdatePanel , so I Regularly using asp: panel , I should suspect that if there are problems with all the panels controls ... besides this, I've seen many problems form master page, and it's the only one I use. I have tried to keep the form on every page, rather than nothing changed. (Read this in any question, I thought I would also try.) & Lt; ContentTemplate & gt; There was a problem around & lt; Asp: UpdatePanel & gt; and my EditPanel was regular & lt; Asp: panel & gt; ; . In this way it will not make any difference that FileUpload is not in the update panel. & lt; Triggers & gt; trigger :
& lt; Trigger & gt; & Lt; Asp: PostBackTrigger ControlID = "Your_Control_ID" /> & Lt; / Trigger & gt;
Comments
Post a Comment