Click here to Skip to main content
15,560,163 members

Comments by TcJoshJohnson (Top 21 by date)

TcJoshJohnson 5-Aug-14 12:39pm View    
First of all, you should be using parameterized queries instead of building the string manually. For example, the query could read "SELECT * FROM Teacher WHERE TeacherId LIKE @_iSearchText". Then, you create a parameter on SqlCommand.Parameters with the name "@_iSearchText". That aside, what is the error you are getting? It is difficult to tell what the problem is here.
TcJoshJohnson 5-Aug-14 12:32pm View    
First of all, why are you calling ToString on ServiceController.Status? Why not use the provided enum? Also, there are more states to a service than "Running" and "Stopped". Instead of using inclusive checks, you should use exclusive checks. For example, instead of "if the service is running, do this" try "if the service is not stopped or stopping, do this".
TcJoshJohnson 28-Jul-14 12:36pm View    
The browser is handling quite a bit of the work for you by constructing the actual multi-part form data. In .NET, you'll need to construct the multi-part form manually. Check out this Stack Overflow post on the same topic: http://stackoverflow.com/questions/19954287/how-to-upload-file-to-server-with-http-post-multipart-form-data
TcJoshJohnson 23-Jul-14 13:08pm View    
Could you perhaps include the code from your controller and view that pertain to this issue?
TcJoshJohnson 23-Jul-14 8:42am View    
Unless the website has an API in place (or directory browsing is enabled), you can't simply send a request that says "send me all of the files you have". You would need to either know the file names or guess them. When guessing, just keep sending GET requests to the server until you don't get a 404 error. It isn't efficient (and will be frowned upon if you aren't the owner of the website), but there aren't too many ways to download files you aren't sure actually exist.