How do I add assembly reference using ASP.NET Web Matrix???

I'm making web system with ASP.NET Web Matrix with C#.
I want to use System.Windows.Forms in order to use OpenFileDalog and I got following error....

Compiler Error Message: CS0234: The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)

Source Error:

Line 3:  <%@ import Namespace="System.Data.SqlClient" %>
Line 4:  <%@ import Namespace="System.Web" %>
Line 5:  <%@ import Namespace="System.Windows.Forms" %>

I don't know how to add reference...Please somebody help with detail answer how to add assembly reference to Web Matrix!
manamiobaAsked:
Who is Participating?
 
naveenkohliCommented:
You will need to use HtmlInputFile control which displays standard file selection dialog box.
You can't sniff paths on client side without help of an activex control installed on machine or some other external mechanism. HtmlInputFile control will get you name of the file (probably path.. but not certain all the time) and content of that file.
See the documentation for this control to see how it is used.
0
 
naveenkohliCommented:
You won't be able to use OpenFileDialog anyways in web application. Calling it would simply invoke the action on server and not on client.
0
 
manamiobaAuthor Commented:
Thank you for your response naveenkohli.
Do you have any idea what I can use instead of OpenFileDialog to let user select a file from dialog box and get its directory path?
0
 
manamiobaAuthor Commented:
Inaddition...
My purpose is not to upload, downlod files on server.
I want to open a dialog box and let user choose a file, get its directory path, and save it to a database.
So when the user visit my site next time, they can open the file they choosed last time by getting directory from the database.
0
 
manamiobaAuthor Commented:
I see.
I will try HtmlInputFile.
Thank you very much for your help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.