|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HtmlInputFile issueHi,
I've a HtmlInputFile control in my aspx file. I browsed Winword.exe from the Program files dir and included that file in that HtmlInputFile control. I use that HtmlInputFile control to just get the path of the applications that is used in a domain. This path information, I'm storing it in the database. I don't process the exe or anything. When I add Winword or Excel or PowerPoint in that control, I get the 'Page cannot be displayed' message. When I add anyother exe, it works fine. Please help. Thanks, Meena Hi,
I know that we cannot upload a file that is bigger than 4MB using HtmlInputFile control. I'm not uploading the file. I just use that control like a Open File Dialog(in Winforms) to get the path of the application. Is there anything I can do about this ? Meena Show quoteHide quote "PK" <usethisaddress-me***@softech-usa.com> wrote in message news:uFdyWQ2dFHA.1456@TK2MSFTNGP10.phx.gbl... > Hi, > I've a HtmlInputFile control in my aspx file. I browsed Winword.exe from the > Program files dir and included that file in that HtmlInputFile control. I > use that HtmlInputFile control to just get the path of the applications that > is used in a domain. This path information, I'm storing it in the database. > I don't process the exe or anything. > > When I add Winword or Excel or PowerPoint in that control, I get the 'Page > cannot be displayed' message. When I add anyother exe, it works fine. Please > help. > > Thanks, > Meena > > > > > > >
Show quote
Hide quote
"PK" <usethisaddress-me***@softech-usa.com> wrote in message This is because:news:uFdyWQ2dFHA.1456@TK2MSFTNGP10.phx.gbl... > Hi, > I've a HtmlInputFile control in my aspx file. I browsed Winword.exe from > the > Program files dir and included that file in that HtmlInputFile control. I > use that HtmlInputFile control to just get the path of the applications > that > is used in a domain. This path information, I'm storing it in the > database. > I don't process the exe or anything. > > When I add Winword or Excel or PowerPoint in that control, I get the 'Page > cannot be displayed' message. When I add anyother exe, it works fine. > Please > help. > > Thanks, > Meena > > > > Winword.exe : 10.1 MB Excel.exe : 8.76 MB Powerpnt.exe: 5.71 MB When you use the HtmlInputFile control, the client will upload the file to the server. If the file is greater than the server will allow, you will get a 'Page cannot be displayed' message. HTH solve your problem, Mythran Hi,
I know that we cannot upload a file that is bigger than 4MB using HtmlInputFile control. I'm not uploading the file. I just use that control like a Open File Dialog(in Winforms) to get the path of the application. Is there any control that can act as an Open File Dialog control? I don't want to use HtmlInputFile control that acts as an Upload control. Meena Show quoteHide quote "Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote in message news:eYJtx62dFHA.720@TK2MSFTNGP15.phx.gbl... > > "PK" <usethisaddress-me***@softech-usa.com> wrote in message > news:uFdyWQ2dFHA.1456@TK2MSFTNGP10.phx.gbl... > > Hi, > > I've a HtmlInputFile control in my aspx file. I browsed Winword.exe from > > the > > Program files dir and included that file in that HtmlInputFile control. I > > use that HtmlInputFile control to just get the path of the applications > > that > > is used in a domain. This path information, I'm storing it in the > > database. > > I don't process the exe or anything. > > > > When I add Winword or Excel or PowerPoint in that control, I get the 'Page > > cannot be displayed' message. When I add anyother exe, it works fine. > > Please > > help. > > > > Thanks, > > Meena > > > > > > > > > > This is because: > > Winword.exe : 10.1 MB > Excel.exe : 8.76 MB > Powerpnt.exe: 5.71 MB > > When you use the HtmlInputFile control, the client will upload the file to > the server. If the file is greater than the server will allow, you will get > a 'Page cannot be displayed' message. > > HTH solve your problem, > Mythran > "PK" <usethisaddress-me***@softech-usa.com> wrote in message Here is a hack you *might* be able to use :)news:Os8JJe3dFHA.584@TK2MSFTNGP15.phx.gbl... > Hi, > I know that we cannot upload a file that is bigger than 4MB using > HtmlInputFile control. I'm not uploading the file. I just use that control > like a Open File Dialog(in Winforms) to get the path of the application. > Is there any control that can act as an Open File Dialog control? I don't > want to use HtmlInputFile control that acts as an Upload control. > > Meena > <script language=javascript> function Form_OnSubmit() { var hiddenField = document.getElementById("HiddenFieldIdHere"); var fileUpload = document.getElementById("FileUploadIdHere"); hiddenField.value = fileUpload.value; fileUpload.disabled = true; } </script> The above snip would place the path into the hidden field and not upload the file to the server. You would need to write the code-behind to fetch from this hidden field though. (hint: use runat=server and define the hidden control). HTH, Mythran Thanks a lot.
Show quoteHide quote "Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote in message news:uXiCK33dFHA.3712@TK2MSFTNGP09.phx.gbl... > > "PK" <usethisaddress-me***@softech-usa.com> wrote in message > news:Os8JJe3dFHA.584@TK2MSFTNGP15.phx.gbl... > > Hi, > > I know that we cannot upload a file that is bigger than 4MB using > > HtmlInputFile control. I'm not uploading the file. I just use that control > > like a Open File Dialog(in Winforms) to get the path of the application. > > Is there any control that can act as an Open File Dialog control? I don't > > want to use HtmlInputFile control that acts as an Upload control. > > > > Meena > > > > Here is a hack you *might* be able to use :) > > <script language=javascript> > function Form_OnSubmit() > { > var hiddenField = document.getElementById("HiddenFieldIdHere"); > var fileUpload = document.getElementById("FileUploadIdHere"); > > hiddenField.value = fileUpload.value; > fileUpload.disabled = true; > } > </script> > > > The above snip would place the path into the hidden field and not upload the > file to the server. You would need to write the code-behind to fetch from > this hidden field though. (hint: use runat=server and define the hidden > control). > > HTH, > Mythran >
Strange Error when viewing page
get the value of dropdownList check if image or file exists Easy way to use bound combo with foreignkey id/value on webform? Target property of ASP hyperlink? set focus List'o MyProj CSS Elements? View DataSet Relational Data how to insert text into middle of textarea DataGrid edit mode |
|||||||||||||||||||||||