• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1682
  • Last Modified:

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!
0
manamioba
Asked:
manamioba
  • 3
  • 2
1 Solution
 
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
 
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
 
manamiobaAuthor Commented:
I see.
I will try HtmlInputFile.
Thank you very much for your help!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now