How to get my project path? [duplicate]

This gives you the root folder: System.AppDomain.CurrentDomain.BaseDirectory You can navigate from here using .. or ./ etc.. , Appending .. takes you to folder where .sln file can be found For .NET framework (thanks to Adiono comment) Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,”..\\..\\”)) For .NET core here is a way to do it (thanks to nopara73 comment) Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, “..\\..\\..\\”)) ;

Windows Forms vs. WPF [closed]

There is no meaning to say that WPF is better than windows forms or vice versa. It depends on many factors: What kind of UI you are building. Obviously, the complexity of the views you are designing will factor in to performance on both platforms. They have different layout and rendering pipelines. How effectively you …

Read more

HTML input type=file, get the image before submitting the form

Here is the complete example for previewing image before it gets upload. HTML : <html> <head> <link class=”jsbin” href=”” rel=”stylesheet” type=”text/css” /> <script class=”jsbin” src=””></script> <script class=”jsbin” src=””></script> <meta charset=utf-8 /> <title>JS Bin</title> <!–[if IE]> <script src=””></script> <![endif]–> </head> <body> <input type=”file” onchange=”readURL(this);” /> <img id=”blah” src=”#” alt=”your image” /> </body> </html> JavaScript : function …

Read more

How to redirect back to form with input – Laravel 5

You can use the following: return Redirect::back()->withInput(Input::all()); If you’re using Form Request Validation, this is exactly how Laravel will redirect you back with errors and the given input. Excerpt from \Illuminate\Foundation\Validation\ValidatesRequests: return redirect()->to($this->getRedirectUrl()) ->withInput($request->input()) ->withErrors($errors, $this->errorBag());