may I know hot can I write something like this c# Opendialog in Razor? I\'m trying to make an openfiledialog that would offer user to upload photo into SqlServerCe database:
You can't use a specific OpenFileDialog (a la c#/winforms/wpf) in a web application (without using Silverlight or some other plugin).
All you can do is use a file input tag, which will cause the browser to open its default file browser dialog box when the user hits the browse button:
<input type="file" name="elementName" />
When the form is posted, that file will be included as part of the input stream.
For the full specification of the <input>
element, go here: http://www.w3schools.com/tags/tag_input.asp