15,899,313 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.
TcJoshJohnson
27-Jun-14 13:06pm
View
This won't work for orgilhp as the share in question is requiring a login, which needs to be provided programmatically.
TcJoshJohnson
27-Jun-14 12:57pm
View
It doesn't "need" to be written that way as it is not proper syntax. This has nothing to do with C#, it is your HTML/JavaScript syntax that is incorrect. You need to either replace the single quotes from onclick with double quotes (as previously suggested) or replace the single quotes in the object literal with double quotes. The same would be true if you hard-coded this HTML snippet in an HTML document.
TcJoshJohnson
20-Jun-14 17:10pm
View
I'm gonna guess the GetString() method is throwing the exception. Take a look at the documentation for this method on MSDN (http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getstring(v=vs.110).aspx). The data you are reading must already be a string. The datatype of the column at index "0" in your case is likely of the integer datatype.
TcJoshJohnson
11-Jun-14 19:56pm
View
You're trying to start the explorer process as the remote machine's user, which isn't possible. You need to PInvoke the WNetUseConnection method to authenticate with the remote server via username/password. WNetUseconnection Doc: http://msdn.microsoft.com/en-us/library/aa385482%28VS.85%29.aspx
TcJoshJohnson
2-Jun-14 13:46pm
View
If I'm not mistaken, I think all tabs reside in the main UI process. Chrome spins up a new process to render the content of each tab and updates the UI through IPC. This was my understanding of the architecture anyway.
TcJoshJohnson
23-Apr-14 13:13pm
View
There is not nearly enough information in this question to pose an answer. Do you have sample code? Are you working with a well known ERP system or library? Or is this a homegrown system?
TcJoshJohnson
22-Apr-14 12:58pm
View
What is the problem you are trying to solve? Can you provide some context? I would also recommend less arrogance in your comments. You won't get much free assistance with an attitude.
TcJoshJohnson
13-Apr-14 9:10am
View
I'm not sure I fully understand your issue. But if you want to delay showing your main form until you finish initializing the application, you need to move your initialization code outside of the form (or call it from the OnLoad event). From a UX perspective, though, I'm not sure that would be the best route. Users want to see that your application is working - even if it is doing something in the background.
TcJoshJohnson
30-Mar-14 0:19am
View
User application settings are stored in an external XML file as well (kept by default in each user's AppData folder).
TcJoshJohnson
30-Mar-14 0:15am
View
Have you tried using System.Linq and the OrderByDescending extension method?
TcJoshJohnson
16-Mar-14 1:14am
View
This is exactly the type of problem the Razor view engine was designed to resolve. Have you looked into making that switch?
TcJoshJohnson
15-Mar-14 22:44pm
View
Regardless of why you want to do this, you will likely want to subscribe to one of the many "Click" events (assuming you are using the DataGridView class). As far as the visual aspect, you can inherit the DataGridView class and override OnPaint() to add your own custom styling (hover bezeling and colors).
TcJoshJohnson
15-Mar-14 22:26pm
View
You'll want to subscribe to SelectedIndexChanged or SelectedValueChanged and grab the SelectedItem property of your ListBox. Then, you can do what you'd like with the selected item such as call Process.Start() with the link.
TcJoshJohnson
5-Mar-14 13:00pm
View
In that case, you'll want to use UNION in the query to combine your result sets.
http://technet.microsoft.com/en-us/library/ms180026.aspx
TcJoshJohnson
5-Mar-14 12:59pm
View
Deleted
In that case, you'll want to use UNION in the query to combine your result sets.
http://technet.microsoft.com/en-us/library/ms180026.aspx
TcJoshJohnson
5-Mar-14 12:39pm
View
If you are looking to retrieve two result sets in the same trip to the database, you can simply execute two selects in the same command and use a DataSet instead of a DataTable. The DataSet will contain a table for each result set of the query. Otherwise, to return relational data from two tables, as Ryan mentioned, you'll want to use a JOIN.
Show More