| | |
Fileuploader with Iframe
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
I want a file uploader,that doesnt cause post back in asp.net 2.0.
With some googleing i found that if i set traget of the form to an iframe on the same page,i can avoid post back.But when i try this the page is getting opened in new window.(ie7 is the browser i am using).
I understand that post back will happen anyway,but can we avoid the page getting opened in new window some how?
Please find my code below:
With some googleing i found that if i set traget of the form to an iframe on the same page,i can avoid post back.But when i try this the page is getting opened in new window.(ie7 is the browser i am using).
I understand that post back will happen anyway,but can we avoid the page getting opened in new window some how?
Please find my code below:
ASP.NET Syntax (Toggle Plain Text)
<form id="form1" action="#" method="post" enctype="multipart/form-data" runat="server" target="myframe"> <input type="file" id="myfile" accept="image" runat="server"/> <input type="submit" value="upload" runat="server" /> </form> <iframe id="myframe"> </iframe>
•
•
Join Date: Oct 2009
Posts: 6
Reputation:
Solved Threads: 2
0
#2 Oct 13th, 2009
Hai,
Why you want to avoid the Postback? Is it to retain the upload path?
If its for retaining path you put one hidden control in the form and set the path to the hidden control so that you can use it again after postback.
If you really want to avoid the postback effect you can use Ajax update panel to prevent the page postback.
Hope this will help you.
thanks,
Shenu
Why you want to avoid the Postback? Is it to retain the upload path?
If its for retaining path you put one hidden control in the form and set the path to the hidden control so that you can use it again after postback.
If you really want to avoid the postback effect you can use Ajax update panel to prevent the page postback.
Hope this will help you.
thanks,
Shenu
0
#3 Oct 13th, 2009
•
•
•
•
Hai,
Why you want to avoid the Postback? Is it to retain the upload path?
If its for retaining path you put one hidden control in the form and set the path to the hidden control so that you can use it again after postback.
If you really want to avoid the postback effect you can use Ajax update panel to prevent the page postback.
Hope this will help you.
thanks,
Shenu
File upload control doesnt seem to work in an update panel.And what i want is an ajax like uploader,where file uploading doesnt disturb other controls of the page.I can use a Modal pop up,but that will be a new page,exclusively for upload right?
i want not just the path,but the whole content of the file send to the server,on click of submit.And that should not disturb anything outside the form...
•
•
Join Date: May 2008
Posts: 254
Reputation:
Solved Threads: 20
1
#4 Oct 14th, 2009
html Syntax (Toggle Plain Text)
<form id="form1" action="#" method="post" enctype="multipart/form-data" runat="server" target="myframe"> <input type="file" id="myfile" accept="image" runat="server"/> <input type="submit" value="upload" runat="server" /> </form> <iframe id="myframe" name="myframe"> </iframe>
Does that work now?
My Blog, Life and everything that matters to me - SamRudge.co.uk
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
•
•
Join Date: May 2008
Posts: 254
Reputation:
Solved Threads: 20
0
#6 Oct 14th, 2009
Firefox, Netscape Navigator and Opera will allow target to eather be an id= or a name= whereas IE only allows name= so I have both to cover all browsers
My Blog, Life and everything that matters to me - SamRudge.co.uk
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
![]() |
Similar Threads
- cookie problem with iframe and different domain (ASP)
- Dynamic iframe height (JavaScript / DHTML / AJAX)
- iframe height (HTML and CSS)
- Resizing an iframe that lives in a table (HTML and CSS)
- iframe help (HTML and CSS)
- mozilla & dynamic width iframe (HTML and CSS)
Other Threads in the ASP.NET Forum
- Previous Thread: Error uploading file - Could not find a part of the path
- Next Thread: dash commerce starter kit...anyone?
| Thread Tools | Search this Thread |
2.0 advice asp asp.net beginner businesslogiclayer c# checkbox control countryselector courier dataaccesslayer database datagridview dropdownlist dropdownmenu explorer expose feedback fileuploader firefox flash form freelance gridview html iframe iis include input internet javascript jquery listbox menu mssql navigation php python redirect relationaldatabases rotatepage search select sql-server tracking treeview up-to-date validatedate validation vb.net video virtualdirectory vista visual-studio visualization visualstudio webarchitecture webdevelopemnt webdevelopment webprogramming windows7 wizard xml xsl






