Ask a Question related to ASP.NET General, Design and Development.
-
Will #1
Stupid C# question Please help!
I'm used to writing my code in VBscript but I have to do
this project in C#. I've written some functions on my
ASP.Net page and I'm getting an error that a namespace I
need access to has not been imported. Normally I would do
that through an Import Page Directive, but that doesn't
work with C#.
Can someone tell me how to include the System.IO Namespace
on my ASP.Net page using C#? I know if I was putting it in
a code-behind file or an assembly file I would just say:
using System.IO;
But that doesn't work in my .aspx page no matter where I
place it in the code. Please help.
Will Guest
-
Stupid question.
I've worked with cfdirectory in the past but it mainly within the scope of deleting/creating a directory or get the name of files within a specific... -
Stupid Question??
I have written a class to be used by asp.net applications that provides a useful function. Other than the constructor, it has just one method. ... -
OK. I'm asking a stupid question
I created a multi-frame movie to use as my website. It has five buttons on it which I added the Get URL action to. When I publish it, and then open... -
a stupid question
how to check the filetype of remote file because is_dir(), is_file() can't work on remote file thx a lot -
Is this a stupid question?
I'm looking for the command to direct a user to a new URL. For example, in ASP, when you created a dropdown box, the item selected could open a... -
carlos medina #2
Re: Stupid C# question Please help!
by default, the System.IO namespace is automacally imported in your ..aspx.. you don't need imported it....
what error specifically asp.net shows you ?????
"Will" <wswelch@comcast.net> wrote in message news:026201c35df5$18075410$a601280a@phx.gbl...> I'm used to writing my code in VBscript but I have to do
> this project in C#. I've written some functions on my
> ASP.Net page and I'm getting an error that a namespace I
> need access to has not been imported. Normally I would do
> that through an Import Page Directive, but that doesn't
> work with C#.
>
> Can someone tell me how to include the System.IO Namespace
> on my ASP.Net page using C#? I know if I was putting it in
> a code-behind file or an assembly file I would just say:
>
> using System.IO;
>
> But that doesn't work in my .aspx page no matter where I
> place it in the code. Please help.carlos medina Guest
-
Will #3
Re: Stupid C# question Please help!
The error is as follows:
Compiler Error Message: CS0246: The type or namespace
name 'OpenFileDialog' could not be found (are you missing
a using directive or an assembly reference?)
The function it is refering to is as follows:
void openDialog(Object sender, EventArgs e)
{
OpenFileDialog fd_Browse = new OpenFileDialog();
fd_Browse.Title = "Scrapbook Image";
fd_Browse.InitialDirectory = @"c:\";
fd_Browse.Filter = "Image Files(*.BMP;*.JPG;*.GIF)
|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*";
fd_Browse.FilterIndex = 2;
fd_Browse.RestoreDirectory = true;
if(fd_Browse.ShowDialog() == DialogResult.OK)
{
tb_ImageFile.Text = fd_Browse.FileName;
}
}
imported in your ..aspx.. you don't need imported it....>-----Original Message-----
>
>by default, the System.IO namespace is automacallynews:026201c35df5$18075410$a601280a@phx.gbl...>
>what error specifically asp.net shows you ?????
>
>"Will" <wswelch@comcast.net> wrote in messagedo>> I'm used to writing my code in VBscript but I have toI>> this project in C#. I've written some functions on my
>> ASP.Net page and I'm getting an error that a namespacedo>> need access to has not been imported. Normally I wouldNamespace>> that through an Import Page Directive, but that doesn't
>> work with C#.
>>
>> Can someone tell me how to include the System.IOin>> on my ASP.Net page using C#? I know if I was putting itI>> a code-behind file or an assembly file I would just say:
>>
>> using System.IO;
>>
>> But that doesn't work in my .aspx page no matter where>> place it in the code. Please help.Will Guest
-
carlos medina #4
Re: Stupid C# question Please help!
the OpenFileDialog class is member of System.Windows.Forms namespace, therefore you cannot use this in asp.net directly.....
"Will" <wswelch@comcast.net> wrote in message news:039701c35e10$0008cbd0$a501280a@phx.gbl...> The error is as follows:
>
> Compiler Error Message: CS0246: The type or namespace
> name 'OpenFileDialog' could not be found (are you missing
> a using directive or an assembly reference?)
>
> The function it is refering to is as follows:
>
> void openDialog(Object sender, EventArgs e)
> {
> OpenFileDialog fd_Browse = new OpenFileDialog();
> fd_Browse.Title = "Scrapbook Image";
> fd_Browse.InitialDirectory = @"c:\";
> fd_Browse.Filter = "Image Files(*.BMP;*.JPG;*.GIF)
> |*.BMP;*.JPG;*.GIF|All files (*.*)|*.*";
> fd_Browse.FilterIndex = 2;
> fd_Browse.RestoreDirectory = true;
>
> if(fd_Browse.ShowDialog() == DialogResult.OK)
> {
> tb_ImageFile.Text = fd_Browse.FileName;
> }
> }
>
>
>
>> imported in your ..aspx.. you don't need imported it....> >-----Original Message-----
> >
> >by default, the System.IO namespace is automacally> news:026201c35df5$18075410$a601280a@phx.gbl...> >
> >what error specifically asp.net shows you ?????
> >
> >"Will" <wswelch@comcast.net> wrote in message> do> >> I'm used to writing my code in VBscript but I have to> I> >> this project in C#. I've written some functions on my
> >> ASP.Net page and I'm getting an error that a namespace> do> >> need access to has not been imported. Normally I would> Namespace> >> that through an Import Page Directive, but that doesn't
> >> work with C#.
> >>
> >> Can someone tell me how to include the System.IO> in> >> on my ASP.Net page using C#? I know if I was putting it> I> >> a code-behind file or an assembly file I would just say:
> >>
> >> using System.IO;
> >>
> >> But that doesn't work in my .aspx page no matter where> >> place it in the code. Please help.carlos medina Guest



Reply With Quote

