Home All Groups Group Topic Archive Search About
Author
22 Jun 2005 7:53 PM
PK
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

Author
22 Jun 2005 9:05 PM
PK
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
>
>
>
>
>
>
>
Author
22 Jun 2005 9:09 PM
Mythran
Show quote Hide 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
>
>
>
>

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
Author
22 Jun 2005 10:12 PM
PK
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
>
Author
22 Jun 2005 10:57 PM
Mythran
"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
Author
22 Jun 2005 11:31 PM
PK
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
>