-
- AJAX stands for Asynchronous Java script and XML
- AJAX enable a page asynchronously post back a page.
- Only required part load from server instead of entire page so its increase web performance.
-
Some control which are design for post back like file browser which can’t load a file if its not post back so you can’t upload a file when it’s in AJAX section.For upload a file in AJAX section using file browser you need to register a button for post back if user will click on than button then all page will be reloaded.<asp:UpdatePanel ID="U1" runat="server"><ContentTemplate>........................................................................</ContentTemplate><Triggers><asp:PostBackTrigger ControlID="saveButton"></Triggers></asp:UpdatePanel>Here is your html code i leave ...... for your content Savebutton is a which post back entire pageSo i registered this button in trigger section post backTrigger register control which have to post back.....Save Button Codeif (FileUpload1.HasFile){string s = "~/Photo/Student/" + FileUpload1.FileName;FileUpload1.SaveAs(MapPath(s));}
Friday, 8 June 2012
How to save a file from HTML File Control in AJAX Section Using ASP.Net with C#
I am a programmer and the founder of Girfa IT Services, working in the field of technology since 2009. I started my career as a computer teacher, which was my full-time profession for nearly 10 years. After a decade of teaching, I decided to turn my passion for programming into my full-time career, while continuing teaching as a part-time activity. In real life, I consider myself a bit lazy—and I have actually turned that laziness into my programming philosophy! I always try to build reusable components, tools, and solutions instead of writing the same code repeatedly. This has become one of my key strengths as a programmer and helps me save time, reduce repetitive work, and build applications more efficiently. For me, programming is not just about writing code; it is about finding smarter, simpler, and reusable ways to solve problems. I believe that a good programmer should not only make things work, but should also make them easier to maintain, reuse, and improve.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment