16,004,525 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 .NET 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 AspDotNetDev (Top 200 by date)
AspDotNetDev
1-Aug-15 22:32pm
View
That is exactly my problem, as I indicated.
AspDotNetDev
29-Jun-15 23:17pm
View
You could always look at Request.Url and compare that against the URL of each LI. Your selector might look something like: $("li > a[href=\"" + Request.Url + "\"]").parent(). Based on how you perform the linking, you may have to do some string manipulation and whatnot. And you might also consider a data attribute rather than the href to account for things like URL case (upper/lowercase might affect selector matching).
Though, if you are using a CMS or if you have some other way of identifying pages (in the case of products, a SKU might be effective), there are better ways of doing this.
AspDotNetDev
21-Sep-14 17:10pm
View
Reason for my vote of 1 \n This is a humorous anecdote, not a real tip/article.
AspDotNetDev
9-Mar-14 1:20am
View
So, that's a second issue... acquiring the data. I've tried this in the past and it's a pain, but there are sources out there, though none that are up to date and that you'd be able to use for free. Again, please update your question with exactly the obstacles you are encountering and any details regarding what you've tried or where you're stuck.
AspDotNetDev
9-Mar-14 1:17am
View
Could you update your question with some further info regarding what you've tried and some sample code? Basically, you'd have to split the sentence into words, lookup each word in the thesaurus, then use the replacement rather than the original word.
AspDotNetDev
9-Mar-14 0:33am
View
You'd want to gather some data (words/synonyms) and build an application that uses that data. Did you have a particular question in mind that you might update your current question to reflect?
AspDotNetDev
9-Mar-14 0:15am
View
Nick, you can post comments below each answer (or below your own question, or in response to other comments). You have posted what is a comment as an answer. I will be deleting your answer since it is not really an answer.
AspDotNetDev
9-Mar-14 0:07am
View
I am confused. How does this answer address the question, which is basically how to toggle a checkbox when an image is clicked?
AspDotNetDev
17-Feb-14 20:46pm
View
Excellent answer! The StringInfo class is exactly what I'm looking for!
AspDotNetDev
6-Jan-14 23:48pm
View
Are you trying to upload the image when the user clicks the submit button? IMG tags will not be sent to the server on submit. You need an INPUT element of type FILE.
AspDotNetDev
19-Jul-13 14:27pm
View
Good luck. FYI, I edited my answer and added an alternative version that does not use jQuery (since that may be too advanced for you).
AspDotNetDev
19-Jul-13 13:44pm
View
I updated my answer. Also, you wouldn't "call the autocomplete function from C# code". The autocomplete widget would call your callback function each time the user types into the textbox, then you'd make your callback call your C# web service, which would return the auto-complete results that get displayed in a list under the textbox.
AspDotNetDev
19-Jul-13 12:38pm
View
Yes, I was able to do that a while back. The autocomplete widget has a JavaScript callback, which you can use to make an AJAX call (say, to a page method or web service written in C#) to get the values to populate the drop down.
AspDotNetDev
15-Jul-13 18:28pm
View
Perhaps. I would give it a try and see if it works.
AspDotNetDev
15-Jul-13 17:54pm
View
So, you need to insert a row into Table1, and one of the fields is Table1.AutoGeneratedPrimaryKey. You need to insert the value of AutoGeneratedPrimaryKey into Table2.ForeignKeyToTable1AutoGeneratedPrimaryKey?
First, ensure that the field Table1.AutoGeneratedPrimaryKey is set to be an identity field (so it will create a number for you automatically). Then, ensure your INSERT statement is actually a compound of two statements, with the second statement being a select statement that returns SCOPE_IDENTITY(). If you are using a newer version of SQL Server, you can use the OUTPUT clause to return the ID without creating a compound statement. Then, use ExecuteScalar() to execute the statement and get the ID.
Once you have the ID, you can pass that as a parameter to another query that inserts into Table2.
See here for a full explanation: http://stackoverflow.com/questions/5228780/how-to-get-last-inserted-id
AspDotNetDev
8-Jul-13 20:44pm
View
See the answer to this (basically, enabled detailed build output): http://stackoverflow.com/questions/1871073/resolving-msb3247-found-conflicts-between-different-versions-of-the-same-depen . You can also find all references to the DLL and ensure they are pointing to the same DLL.
AspDotNetDev
28-Jun-13 19:56pm
View
What do you mean by "host a website"? If you just want to run the website on your computer so you can see it, you can do that within Visual Studio 2010 (with comes with a built-in web server known as Cassini). Or, do you mean host a website on your home computer so that others can visit your website from their computers over the internet? Or, do you want to just host the website locally (so that only you can see it from your computer) without installing Visual Studio?
AspDotNetDev
28-Jun-13 14:34pm
View
FYI, you don't have to set "innerText". You can instead append a child that you create using createTextNode.
AspDotNetDev
25-Jun-13 13:20pm
View
FYI, I deleted your "answer". Please post replies as comments in reply to the specific comment you are replying to (notice the reply button to the right of each comment). Also, I doubt you will get much help with such a general question.
AspDotNetDev
22-Jun-13 2:34am
View
I have no idea what you are doing. Please update your question to explain in more detail. Or create a new question if you have a different question.
AspDotNetDev
21-Jun-13 19:25pm
View
This isn't really your question, but you should generally avoid using MAX to get the last created primary key, as that may not always be correct. Use @@IDENTITY instead: http://msdn.microsoft.com/en-us/library/ms187342.aspx
AspDotNetDev
21-Jun-13 19:15pm
View
Your question doesn't make much sense. Can you expand it some?
AspDotNetDev
21-Jun-13 19:14pm
View
Have you tried using DateTime? It supports comparison operators.
AspDotNetDev
12-Jun-13 20:03pm
View
Good idea. I will delete the question.
AspDotNetDev
12-Jun-13 20:02pm
View
You need 5 classes and the relation between them is associative. Or were you looking for a different answer? If so, I recommend deleting your question, and creating a new question if you have a specific problem you need help solving.
AspDotNetDev
1-Jun-13 14:42pm
View
Not really an answer. You could have easily posted that as a comment.
AspDotNetDev
1-Jun-13 14:41pm
View
Also, since you may be new to the site, keep in mind that you can edit your question to modify it. I recommend you start by editing your title, and then you also edit the body of your question to be more clear.
AspDotNetDev
1-Jun-13 14:41pm
View
The title of your question is way too long, and you haven't explained very clearly at all what difficulties you are having. The link I pointed you to earlier (in a different question) showed exactly what classes are and how to use them in code. If you want any sort of valuable help, you are going to have to try harder to ask clearer questions.
AspDotNetDev
1-Jun-13 14:27pm
View
Please ask a new question, and be very clear about what you understand and what you do not understand and what you have tried that did not work. The Code Project Quick Answers area is not intended for tangential discussions. It is intended for very specific questions with very specific answers.
AspDotNetDev
1-Jun-13 14:15pm
View
http://msdn.microsoft.com/en-us/library/vstudio/x9afc042.aspx
AspDotNetDev
1-Jun-13 14:08pm
View
Is this a homework assignment? If so, I suggest you ask your teacher for help in the areas you do not understand.
AspDotNetDev
31-May-13 17:41pm
View
Don't use a static variable. If you do that, all visitors of the site will have the same random number. The random number will also change for all users whenever another user visits the page. Surely you do not want that.
AspDotNetDev
31-May-13 17:29pm
View
You posted an answer instead of a comment. I will be deleting your fake answer. If you want to ask one of the answerers a question, please post a comment on their question.
AspDotNetDev
20-May-13 20:25pm
View
Do you mean "Exclude From Project"? I see that in my context menu when I right click an item.
AspDotNetDev
1-May-13 22:19pm
View
I am not sure if you are asking me a question, but maybe my tip will help you: http://www.codeproject.com/Tips/130267/Call-a-C-Method-From-JavaScript-Hosted-in-a-WebBro Otherwise, ask a question here: http://www.codeproject.com/Questions/ask.aspx
AspDotNetDev
5-Apr-13 14:01pm
View
The stored procedure accepts 2 parameters, but you are adding 5 parameters. Seems pretty obvious that won't work. Or, did you have another question?
AspDotNetDev
3-Apr-13 14:59pm
View
Haven't really read your question, but maybe you shouldn't self-close script tags (I don't really know what XUL code is, so maybe it doesn't apply)? I have run into a similar problem before: http://www.codeproject.com/Questions/45415/JavaScript-Function-Not-Called-When-Defined-in-Ext
AspDotNetDev
28-Mar-13 20:25pm
View
Looks like you are trying to have IIS point to a folder in your Documents folder. That may cause problems with permissions. Try moving everything to c:\sites\PROPOSAL_MGT_SYS and have IIS run it from there.
AspDotNetDev
27-Mar-13 20:57pm
View
FYI, I deleted the answer you posted, as it should have been posted as a comment. Also, glad I could be of assistance :-)
AspDotNetDev
27-Mar-13 19:37pm
View
You don't need a web service for auto-suggestion. You can have JavaScript do auto-suggestion (aka, autocomplete) with any data source. Is there a particular type of data you were looking for?
AspDotNetDev
11-Mar-13 1:34am
View
I don't have time to answer this right now, but I'll give you a couple pointers to lead you in the right direction. First, you need a way for each page to identify the selected LI. Looks like you can use the "CategoryID" from the query string for that (Google "JavaScript query string"). Then you can put a class on each LI that identifies it with the same number as the CategoryID (e.g., "li class='item_22'"). Also, don't run the JavaScript on the click event... any DOM attributes will be lost when the page navigates. Instead, run it when the page has finished loading.
AspDotNetDev
8-Mar-13 13:58pm
View
For this particular line of code, I'd store the string in a configuration file and load it. You wouldn't be able to make it a const, but you'd still be able to make it readonly.
AspDotNetDev
8-Mar-13 1:16am
View
Read the documentation, Google, or maybe use Intellisense to figure it out. If you don't make any progress that way, create a new question and ask there.
AspDotNetDev
5-Mar-13 13:31pm
View
Not sure about 2010, but I was able to get a SharePoint 2013 environment installed on my laptop. Basically, I installed SharePoint Server 2013 and Visual Studio (2010 or 2012... I forget) in a Windows Server 2012 virtual machine hosted by Hyper-V on a Windows 8 laptop. I recommend at least 16GB of RAM, 12 of which you can assign to the VM (also, the VM requires at least 4 cores). If you have MSDN, I believe you can download all the necessary software.
AspDotNetDev
3-Mar-13 19:31pm
View
For one, the data structure would be more interesting, because then you wouldn't be storing one cost per edge, but two. However, Dijkstra's algorithm may work for that too... I haven't really thought about it. I only mentioned it so that you would consider that possibility and that there may or may not be further implications to consider.
AspDotNetDev
28-Feb-13 12:17pm
View
I was going to suggest a UNION ALL, but it seems you've already done that. Not sure what type of performance you're getting, but the problem may something aside from the unions. You could avoid the DISTINCT and then filter the results on the machine that's getting the results.
AspDotNetDev
27-Feb-13 23:29pm
View
FYI, your name appears in the folder path in the error message. You may want to edit your question to remove that if it's important to you.
AspDotNetDev
27-Feb-13 14:33pm
View
In the past, I have created instances of WebBrowser controls (on the server) in order to render web pages, which I then embedded into PDFs (when then got served up to the client for download). If some JavaScript initiated an alert() during that process, that could potentially screw things up. I suspect this is what the OP is talking about, but OriginalGriff is right that they should clarify so we don't waste our time trying to read their mind.
AspDotNetDev
22-Feb-13 17:31pm
View
What are you using as a UI? Console, Windows Forms, WPF, ASP.NET, ...?
AspDotNetDev
13-Feb-13 20:08pm
View
That would not throw an exception. Also, a couple notes to more effectively use Code Project. 1) You can edit your question rather than replying to your question (this allows you to syntax highlight code snippets). 2) If you reply to my comment rather than commenting on your own question, I will get a notification and can respond to you faster.
AspDotNetDev
13-Feb-13 18:22pm
View
Please update your question with the code that you are using. Make the code sample as small as possible, but fully demonstrate the problem. This will help us give you a quick and complete answer.
AspDotNetDev
13-Feb-13 18:18pm
View
This is called validation, and there are many ways to handle it. First off, are you making a Windows Forms, ASP.NET Web Forms, ASP.NET MVC, WPF, Silverlight, a console application, or something else?
AspDotNetDev
13-Feb-13 18:01pm
View
How are you currently adding the image to the page? If it's a constant filename, such as "\\ip_camera\image.jpeg", you could just use JavaScript to keep changing the query string, such as "\\ip_camera\image.jpeg?version=88".
AspDotNetDev
13-Feb-13 17:40pm
View
Answer updated.
AspDotNetDev
4-Feb-13 12:15pm
View
I updated my answer with a code sample.
AspDotNetDev
31-Jan-13 14:26pm
View
Post a new question and maybe somebody will answer it. You won't get an answer by posting a non-question to a comment in the answer for another person's question.
AspDotNetDev
28-Jan-13 19:36pm
View
FYI, I deleted the text you posted as an answer, as it should have been posted as a comment on my answer instead. Also, good luck. :-)
AspDotNetDev
25-Jan-13 18:43pm
View
Awesome :-)
AspDotNetDev
25-Jan-13 12:14pm
View
I have no idea. Post a new question about your issue and make sure to include some sample code. Make sure to include only the relevant code so your sample is as small as possible.
AspDotNetDev
23-Jan-13 19:12pm
View
I'm glad to hear it worked for you :-)
AspDotNetDev
22-Jan-13 18:18pm
View
I updated my answer to show you an example.
AspDotNetDev
11-Jan-13 14:16pm
View
Not sure what you mean, but any variable (member or static) on the class for a given page would not work because it should be accessible from any control (and controls should have no knowledge of the specific page they are on, because they may reside on many pages). Though, maybe if I put it on the page and passed a delegate to the control so it knows how to get/set the page variable, that'd work. Seems complicated though.
AspDotNetDev
10-Jan-13 12:30pm
View
Note to self: this may be what I'm looking for: http://www.codeproject.com/Articles/109026/Chained-null-checks-and-the-Maybe-monad
AspDotNetDev
3-Dec-12 19:51pm
View
jQuery and Knockout.js. Maybe some plugins depending on your specific implementation: http://archive.plugins.jquery.com/
AspDotNetDev
3-Dec-12 19:49pm
View
What kind of "graph" are you talking about? An equation graph? An Excel-style graph of some sort (e.g., bar graph)? Do you want to save it for later manipulation (i.e., a bar graph that can have data points added to it)? Add any more details you think may be pertinent.
AspDotNetDev
28-Nov-12 15:00pm
View
The OP wasn't very clear, but the question was not how to program in C#. It was how to view the source code for built-in classes in the .Net Framework.
AspDotNetDev
1-Nov-12 13:03pm
View
Are you talking about a GUID (also known in SQL Server as uniqueidentifier)?
AspDotNetDev
30-Oct-12 18:32pm
View
What problem are you having with your code? Is the file local to the server the webpage is running from, or is it on an external server? Do you actually want to read each line consecutively, or do you want to just dump the contents of the entire file into a textbox?
AspDotNetDev
30-Oct-12 18:30pm
View
FYI, I don't think your solution would solve the problem. See my answer for a description of what I think the problem is.
AspDotNetDev
3-Oct-12 21:41pm
View
What is a text twist?
AspDotNetDev
21-Sep-12 19:30pm
View
FYI, you set "EnableSsl" twice in your example code.
AspDotNetDev
14-Sep-12 16:53pm
View
You have answered every single one of your questions with a link to your articles. I'd guess that you may have the articles written before you even ask the question. It seems like you're just using Code Project to create an index to your site. That increases your search ranking using very dubious and devious tactics. I think every one of your supposed questions should be deleted. And any further content you've "contributed" to Code Project should be looked at for further abuse.
AspDotNetDev
10-Sep-12 14:22pm
View
Also, if you are just trying to run the website to do web development, just go to the "Debug" menu and select "Start Debugging". You don't need IIS. Visual Studio has a built-in web server (Cassini) it uses to debug web apps.
AspDotNetDev
10-Sep-12 14:04pm
View
What is your question?
AspDotNetDev
21-Aug-12 3:41am
View
Out of curiousity, are you trying to redirect from site.com to www.site.com? That is, are you trying to ensure the www subdomain gets prefixed to your site? There are some answerers below who seem to think you want something else.
AspDotNetDev
21-Aug-12 3:27am
View
Even if you didn't understand that the OP was asking for redirection, you didn't even bother to prefix the "www." In any event, you can always delete your own question if you felt you didn't understand the question clearly.
AspDotNetDev
20-Aug-12 23:53pm
View
Why would client-side code be preferable? The server serves up the client side code from the server side. And your client side technique is slow, as it requires jQuery to load. Not to mention you have not actually posted a client-side solution. You have just shown how to show a dialog with the URL, rather than actually performing a redirect.
AspDotNetDev
20-Aug-12 15:29pm
View
The OP certainly could read the documentation, but I actually posted a specific answer that is likely to be more informative.
AspDotNetDev
20-Aug-12 14:50pm
View
I presume the questioner is asking about performing a redirect, not actually displaying the altered URL in a textbox.
AspDotNetDev
20-Aug-12 14:49pm
View
No client-side code should be necessary. This can be done with Response.Redirect from the server-side.
AspDotNetDev
19-Aug-12 0:07am
View
Ignore this comment. I am just testing if I get a notification when I reply to my own comment.
AspDotNetDev
17-Aug-12 21:52pm
View
Looks like you are a bit late and your answer is not as informative as the others (e.g., it contains the SQL injection vulnerability and the redundant setting of the connection).
AspDotNetDev
17-Aug-12 21:11pm
View
Your code is vulnerable to SQL injection: http://xkcd.com/327/ . Use parameterized queries instead: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx .
AspDotNetDev
17-Aug-12 13:34pm
View
Does it say what the URL is (it would be in the error message, not in the address bar)?
AspDotNetDev
14-Aug-12 18:37pm
View
Also, be more clear about what your actual problem is. Are you unabled to figure out the calculation? Are you having some sort of trouble initiating the calculation at some pre-determined time? Be specific.
AspDotNetDev
14-Aug-12 18:36pm
View
Please edit your question to be more specific. Include the code you are currently using, and be more clear about exactly the type of calculation you are trying to perform.
AspDotNetDev
13-Aug-12 19:41pm
View
Your question makes no sense at all. I will be deleting it.
AspDotNetDev
13-Aug-12 19:40pm
View
I don't know much about the environment you are using, but is there such a thing as a rich text box? If not, then I'm afraid you probably can't use two different fonts in a single standard textbox.
AspDotNetDev
13-Aug-12 19:38pm
View
I voted your answer a 2 because it is not an answer (however useful the advice may be). If you think the question is garbage, downvote, delete, edit, or comment on it. If you think there is something tangentially related to the code that is not an answer, post it as a comment.
AspDotNetDev
8-Aug-12 20:15pm
View
I am confused. I don't see an output parameter in that stored procedure, yet your C# code shows an output parameter. Please edit your question to include any code rather than posting it as a comment so we can all get a clear picture of what is going on.
AspDotNetDev
1-Aug-12 20:59pm
View
Actually, IIS does allow an admin to specify which types of files will be served. You could, for example, prevent any file ending in ".css" from being served up (this is why it won't serve up ".vb" and ".cs" files in a typical configuration). And IIS may not serve up content if a virtual directory has not been setup where the content is located. Otherwise, I agree with you; the user's problem is likely how they reference the files rather than how IIS is configured. They should update their question with the actual page content they are using.
AspDotNetDev
3-Jul-12 13:04pm
View
Reason for my vote of 1
My reasons for my vote of 1...
The title is too long. You can have a short title and a long description.
You never assign a value to "result". There is no need to pass it ByRef. Try it without and you'll see.
You leave indentation in your code snippets for no reason. Remove the unnecessary indents.
Why have you wrapped your call to the code in a try/catch block that does nothing? It's not necessary for this tip, so remove it.
You call functions (e.g., "ToString") without the parens at the end. While VB.NET allows this, it's poor style (IMO).
Calling "result.ToString()" on each recursive call completely cancels out any benefit you would get for using a StringBuilder.
The name "CodeAnswerTwo" is meaningless to us readers. Perhaps choose a name and an example of something meaningful to a reader?
As was already stated, you should call AppendFormat instead of String.Format.
You marked this as advanced. If it were implemented properly, it would seem a pretty simple use of StringBuilder and wouldn't really be advanced (IMO).
AspDotNetDev
21-Jun-12 19:26pm
View
It's not clear that the OP even wants anything to update, but if they are I'd probably recommend to them that they just use an UpdatePanel (unless they were using MVC).
AspDotNetDev
21-Jun-12 18:54pm
View
Maybe you have AutoPostBack set to true on the textbox? Edit your question to add some markup/code so we can see an a small example of exactly what you're talking about.
AspDotNetDev
19-Jun-12 20:19pm
View
Reason for my vote of 5
It's been a while since I found a tip/trick I could use. Other than some oddities (the plugin took 5-10 seconds to run the first time and it expanded all in one folder the first time), this is a very nifty add-on. Thanks for the tip!
AspDotNetDev
8-Jun-12 21:06pm
View
I just noticed the question was tagged as JSP and not ASP.NET. Assuming JSP can handle AJAX, the principle should be the same. That is, can't do it entirely on the client (the server will have to be involved), unless Java (on the client side) or Flash are used.
AspDotNetDev
7-Jun-12 22:08pm
View
It makes perfect sense to use the plus operator. And the error from the OP indicates that it does not support Concat (that would only be apparent at runtime, and I don't feel like testing that right now).
AspDotNetDev
7-Jun-12 12:37pm
View
Oh yeah, I forgot that we are dealing with LINQ to Entities. Stick with the + operator.
AspDotNetDev
6-Jun-12 22:34pm
View
Your recommended change of using the Concat function rather than the + operator provides no actual improvement. That is to say, using the Concat function in this case offers no benefits over using the + operator. Neither approach is superior or inferior to the other in this example.
AspDotNetDev
6-Jun-12 22:32pm
View
Only if it's an actual improvement, which this does not appear to be.
AspDotNetDev
6-Jun-12 22:28pm
View
With smallest what?
AspDotNetDev
6-Jun-12 21:14pm
View
You may have better luck posting your question in the Article Writing forum: http://www.codeproject.com/Forums/1641/Article-Writing.aspx
AspDotNetDev
6-Jun-12 20:36pm
View
Why? The compiler will do that for you, and for only 2 strings there is no benefit.
AspDotNetDev
6-Jun-12 19:34pm
View
Maybe, maybe not. Maybe they are building screen capture software and have some reason not to have the window near the edge of the screen, or maybe they are building a remote desktop utility and want to avoid having the window near the hover location that causes the toolbar to appear, or maybe they are building a puzzle game out of windows that involves the user placing windows in certain configurations without violating certain rules (e.g., not within 140px of the edge of the screen). I don't think we can make assumptions like this being poop UI design when we have no idea what is being designed.
AspDotNetDev
6-Jun-12 19:27pm
View
I'd also add that you don't need to do the query if the parse fails (which would save you a database hit), and that you should not be using Response.Write (use a label or something like that instead).
AspDotNetDev
6-Jun-12 19:24pm
View
You have it reversed and Clifford beat you. I recommend you delete your answer.
AspDotNetDev
6-Jun-12 19:10pm
View
Probably also a good idea to hook up to a few more events, such as move and resize. Here is some info for the OP on the move event:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.move(v=vs.100).aspx
AspDotNetDev
30-May-12 3:15am
View
It's a longshot, but I have seen something like this when I had a circular reference (in particular, a property that was trying to return itself). Maybe there is something like that in a recent change you made.
AspDotNetDev
28-May-12 23:54pm
View
I never got it working.
AspDotNetDev
23-May-12 19:15pm
View
Why do you keep copying other answers?
AspDotNetDev
23-May-12 19:12pm
View
Why have you copied the other answer?
AspDotNetDev
23-May-12 16:43pm
View
Why give this person a 5 when they obviously copied the other answer?
AspDotNetDev
23-May-12 13:17pm
View
Why have you copied the other answer and presented it as your own answer?
AspDotNetDev
16-May-12 4:47am
View
Reason for my vote of 5
I learned a few things. Great idea putting these all in one place... Google doesn't like to search based on some of these characters, so this should help anybody that comes across it.
AspDotNetDev
15-May-12 21:25pm
View
I don't know what you mean. I posted that message in the ASP.NET forum. You have not replied to that message. We had a conversation in the Lounge, but that was inconclusive.
AspDotNetDev
15-May-12 0:08am
View
FYI, my comment was too large to reasonably fit here, so I created a thread where we can discuss this (short version: I don't want a URL dedicated to login): http://www.codeproject.com/Messages/4250879/Discussion-For-My-ASP-NET-MVC-Reusable-Components-.aspx
AspDotNetDev
14-May-12 18:16pm
View
I assumed that basically chooses the view for me by calling that action, which seems a lot like Html.Partial/RenderPartial. I don't see how it'd allow me to provide a postback which calls the LogOn action method on the AccountController without changing the URL. Though maybe I don't understand it fully. Could you update your answer to show a full example? I will also try to play around with this when I get home from work.
AspDotNetDev
13-May-12 7:07am
View
Another possibility I'm considering is using AJAX, but I'm curious if there are other workable solutions.
AspDotNetDev
13-May-12 7:03am
View
I guess you could say I'm after a referrer view. And note that this partial view isn't being used by only one view... it's being used by essentially all views (I simplified my example).
AspDotNetDev
4-May-12 13:14pm
View
String literals or the asp:Literal user control? What are you trying to do, exactly? What have you tried?
AspDotNetDev
29-Apr-12 17:18pm
View
An interesting approach that gets my 5. However, it is still a bit too intrusive and inelegant for my tastes, so I will probably just do a an AJAX postback rather than use client-side validation. Still, your solution may be viable for somebody who must use client-side validation.
AspDotNetDev
26-Apr-12 19:37pm
View
The "hook into the fail path" is the thing I'm having trouble figuring out how to do. I'm using an ASP.NET validator, and I'm not sure if there is a way to register for a fail event on an attempted postback. I updated my question with some sample code for your reference. I suppose I could create a custom client-side validator, but that seems like a lot of work for something that seems so simple.
AspDotNetDev
12-Apr-12 3:28am
View
Are you using ASP.Net (web forms or MVC), Windows Forms, or WPF? What do you need help with specifically? You need to be more specific to get a good answer.
AspDotNetDev
12-Apr-12 3:26am
View
I will be deleting this question. Please be more specific with your future questions.
AspDotNetDev
9-Apr-12 13:00pm
View
This is more of a comment than an answer.
AspDotNetDev
29-Feb-12 0:10am
View
I forget, are there any licensing limitations on using that in a production environment?
AspDotNetDev
27-Feb-12 18:58pm
View
Over 10,000 results when I put it in quotes.
AspDotNetDev
27-Feb-12 18:00pm
View
Yeah, not sure how to find it. I Google doesn't like to search special characters (such as quote marks).
AspDotNetDev
27-Feb-12 17:59pm
View
No such luck. Tried IE/Chrome/Firefox. All errors came from my IP address.
AspDotNetDev
16-Feb-12 19:41pm
View
I am having trouble understanding your question. Will you edit it to provide some short sample code?
AspDotNetDev
15-Feb-12 13:34pm
View
Deleted
It's possible. Please see my message in the forum below: http://www.codeproject.com/Messages/4158126/AUDissa-Regarding-Calling-Csharp-From-JavaScript-o.aspx
AspDotNetDev
12-Feb-12 15:33pm
View
I don't know what you mean, but the instance variable "test" is just a random instance variable. It could have been anything. A number, a string, a web request, a dragon, whatever. And the method called on it could be any valid method to call on that type (in this case, I chose to call ToString()). But, for my real use, any property or variable can also be called. And it can be a chain (e.g., "test".ToString().ToString().ToString() or myDragon.BreathFire().Fly().Whatever).
AspDotNetDev
12-Feb-12 14:50pm
View
The purpose of this code is to conditionally call a chain of property/method/variable accesses (a.b.c().d.E.F). If I just wanted to execute the code, I'd just execute the code.
AspDotNetDev
10-Feb-12 21:10pm
View
Note that I'm fine with a solution that uses either C# or VB.Net... I can easily translate between them.
AspDotNetDev
23-Jan-12 19:31pm
View
The answer is blindingly obvious, but the question is poorly written. We don't care that your question is urgent and your title reveals nothing of your actual question. Put some effort into asking your questions and you will get better answers.
AspDotNetDev
23-Jan-12 18:00pm
View
That does not make any sense at all.
AspDotNetDev
23-Jan-12 18:00pm
View
That does not make any sense at all.
AspDotNetDev
23-Jan-12 18:00pm
View
That does not make any sense at all.
AspDotNetDev
21-Jan-12 13:52pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:52pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:52pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:51pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:50pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:50pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
21-Jan-12 13:49pm
View
I have voted you a 1 because this is one of 15 obvious homework questions you have just posted. Not only are you asking us to do your homework, you are asking us to do ALL of your homework. That is abusive, and I have reported you as such.
AspDotNetDev
18-Jan-12 18:14pm
View
Deleted
Reason for my vote of 1
You posted this in what is obviously the wrong place.
AspDotNetDev
18-Jan-12 18:14pm
View
Deleted
Please post your question in the Site Bugs and Suggestions forum or the Article Writing forum. I will be deleting your post, as it is not a tip/trick.
AspDotNetDev
16-Jan-12 21:57pm
View
Is this homework you have been assigned? If that line isn't obvious to you, I suggest you either figure out how to use the debugger or figure out how to show a message using MessageBox.Show. Google will be your friend for either of those tasks.
AspDotNetDev
16-Jan-12 21:37pm
View
There's a lot that could be explained. What specifically don't you understand about the code?
AspDotNetDev
14-Jan-12 13:51pm
View
Mark, FYI, the OP added a comment, but not as a reply to your comment, so I'm sending you this reply so you will be notified.
AspDotNetDev
13-Jan-12 10:07am
View
Deleted
Yep, except one is in C# and one is in VB.net.
AspDotNetDev
10-Jan-12 19:19pm
View
Implementing a particle simulator for gravity? I made a few of those in high school. Particle Fire is one of the things that got me excited about it: http://www.longbowgames.com/seumas/ and http://www.longbowgames.com/particlefire/
AspDotNetDev
10-Jan-12 16:56pm
View
Yeah, vectors have lots of uses, but speed and velocity are well defined uses of vectors. They are different, and the difference is important, although perhaps the terminology is not strictly important to the OP (neither of us know that).
AspDotNetDev
10-Jan-12 16:06pm
View
Not velocity... speed. If you wanted the velocity, you could multiply the speed by a unit vector derived from the original vector (that product would result in the original vector, but separating them out makes the speed and direction more clear).
And yes, this is the same as you had above, with some variables and terms renamed and clarified.
AspDotNetDev
4-Jan-12 17:32pm
View
Deleted
Good advice. I often do this.
AspDotNetDev
21-Dec-11 2:23am
View
Deleted
We have search engines to find articles like that for us. If everybody created tips/tricks to point others to their REAL articles, we'd have a lot of unnecessary clutter. Put the links in your profile if you want people to see them. Or even in your personal forum (which is located at the bottom of your profile and which you must activate to use).
AspDotNetDev
20-Dec-11 19:28pm
View
Deleted
Exceptions can be thrown from constructors in .Net. JSOP's problem is likely that creating a FileInfo object does not actually inspect the file (i.e., properties are lazy loaded).
AspDotNetDev
16-Dec-11 12:40pm
View
Deleted
Reason for my vote of 1
This is just self promotion and its transitory nature makes it more suited as a forum message than a tip/trick.
AspDotNetDev
16-Dec-11 12:28pm
View
You should be using SqlParameters rather than combining the parameters into the string used for the SqlCommand. You should familiarize yourself with Bobby Tables: http://xkcd.com/327/
AspDotNetDev
14-Dec-11 22:46pm
View
It worked for me. Play around with the regex options (one of the parameters in the Regex constructor), especially those dealing with multiline (I think you'll actually want singleline) and the newline character.
AspDotNetDev
7-Dec-11 17:19pm
View
"sorry about my English but may be because i a" -- you never finished that thought. Your poor English may be your greatest barrier to getting a job.
"i found jobs but not in my career" -- obviously, flipping burgers would be a waste of your time. If you are doing non-programming but you get to work with programmers, that's a start.
"i even look for job for free" -- if you can work for free, spend some of your free time improving open source projects or writing articles here on Code Project. Might as well build your portfolio.
AspDotNetDev
28-Nov-11 12:20pm
View
Deleted
FYI, this doesn't make sense: ((String)Container.DataItem)["field1"]. Strings do not have an indexer with a string parameter.
AspDotNetDev
17-Nov-11 12:42pm
View
Deleted
This should be a comment, not an alternate.
AspDotNetDev
16-Nov-11 17:07pm
View
I improved your question. However, it is not clear if you are talking about different keys for each event (pause, resume, quit) or if each event uses a different key (e.g., ENTER to pause, SPACE to resume, ESC to quit). Also, it is not clear if you would like each event to only happen once in the other you specified, or if they can happen anytime and any number of times (e.g., pause, resume, pause, resume, pause, resume, quit). Please edit your question to clarify what you are looking for. Also, let us know exactly what you are having trouble with specifically (intercepting key presses, what to do when the loop is paused, quit the program, and so on).
AspDotNetDev
11-Nov-11 12:50pm
View
Deleted
Reason for my vote of 1
This iterates, which is clearly to be avoided for this tip/trick. The longer the date difference, the longer this code will take to execute. Also, some of your variable names are incorrect (e.g., the C# declares a variable sDate, but then uses dt1 instead).
AspDotNetDev
10-Nov-11 17:01pm
View
Oftentimes, the inability of one to come up with an idea is due to a lack of imagination. Allow me to stir it up for you with some random words and ideas: donkey, hyperdragons, sequential infinity, stock dock, abstract whiteboards, cram jungle... donkey.
AspDotNetDev
7-Nov-11 12:51pm
View
Deleted
Can't you just do this: "Cars/Wheel[@boltPattern='5' and @Bling='True']"
AspDotNetDev
2-Nov-11 20:47pm
View
I recommend using a JSON stringify method or one of the reflection methods SAKryukov posted links to. You might also want to use the Chrome debugger. Or you could use FireFox since it seems like you just need the info to debug.
AspDotNetDev
2-Nov-11 11:13am
View
Also, make note of the exact error you are being given, rather than just saying "give me the same error."
AspDotNetDev
2-Nov-11 11:13am
View
Did you Google how to set the display property to "none" before you tried to do it? It's a CSS property, so it's different than how you would set, for example, the "disabled" property.
AspDotNetDev
2-Nov-11 2:00am
View
A LinkButton will render in HTML as an anchor tag (an "A" tag). Anchor tags don't have a disabled property. Depending on what you are trying to acheive, you can add a click handler to the anchor tag that just returns false. That will prevent the click from happening. You may also want to add a class or some style that makes the anchor look disabled (e.g., gray rather than blue). You could also set the style to "display: none;" and that would completely hide the anchor tag... you could then show some text in its place (and maybe style it too look like an anchor tag that is disabled).
AspDotNetDev
28-Oct-11 2:08am
View
Actually, I just tried the syntax I was thinking of and it didn't work: MyList=System.Collections.Generic.List`1[System.String]
AspDotNetDev
28-Oct-11 2:05am
View
Doesn't seem to work. I came across some funky syntax that used an apostrope and some square brackets, but I forget exactly what it looked like. I'll probably do some more searching tomorrow.
AspDotNetDev
27-Oct-11 20:48pm
View
What specifically are you having a problem with? And what exactly are you trying to save to a database? A filled out PDF form? Edit your question to provide further information.
AspDotNetDev
27-Oct-11 13:21pm
View
Sorry, but you do not understand the question and this is not an appropriate or useful answer. I am not trying to import the "Generic" namespace. I am trying to input a generic type and alias it. I am not trying to import a parent namespace without aliasing either.
AspDotNetDev
26-Oct-11 22:59pm
View
Does not answer my question at all. I know how to import namespaces and explicitly said I'm not interested in an answer for how to do that in the code behind. I will be deleting your answer.
AspDotNetDev
24-Oct-11 20:16pm
View
Please format your question better and include sample data and sample output, with clear examples of what you are trying to do.
AspDotNetDev
21-Oct-11 18:15pm
View
Deleted
FYI, I recommend deleting this tip/trick and making it an alternate to this one: http://www.codeproject.com/Tips/61692/See-the-SQL-Generated-by-LINQ . Notice that one of the alternates is almost identical to your tip/trick.
AspDotNetDev
14-Oct-11 18:10pm
View
Just to clarify, you want to store C# code in a SQL database and then later load that code and execute it from C#?
AspDotNetDev
14-Oct-11 18:06pm
View
Yeah, it's a common practice at large companies. Working at smaller companies certainly has its advantages.
AspDotNetDev
14-Oct-11 16:54pm
View
When I tried to open that image at work, I got a message saying I couldn't view the page because it was categorized as "sex". For others at work, be careful when viewing whatever that image is.
AspDotNetDev
13-Oct-11 19:06pm
View
What's your question?
AspDotNetDev
11-Oct-11 13:36pm
View
Deleted
Sorry Ram, didn't mean to reply to you. Meant to say that to ignatandrei.
AspDotNetDev
11-Oct-11 13:36pm
View
Deleted
This is not an alternate. You should have posted this as a comment.
AspDotNetDev
6-Oct-11 20:30pm
View
ASP.NET? And this sounds like something one could easily find on Google... is there some reason you couldn't?
AspDotNetDev
3-Oct-11 18:32pm
View
I think the OP is referring to the ability in C++ to make friend classes. But that is a wild guess and I could be wrong. The OP should clarify.
AspDotNetDev
28-Sep-11 20:49pm
View
Just tried at work (Windows 7 computer) and no luck there either. shdocvw.dll version is 6.1.7600.16385.
AspDotNetDev
27-Sep-11 23:02pm
View
Hmmm, sounds plausible, but still no luck on my computer. My project was using .Net 4 Client Profile, so I changed it to .Net 4 and that didn't work. Also, I was using a C# Windows Forms project, though I doubt that would matter. In C:\Windows\System32\shdocvw.dll is version 6.0.6002.18392. I am also on Windows Vista. I will have to try at work (Windows 7) to see if I have better luck.
AspDotNetDev
26-Sep-11 20:02pm
View
IE9 and FF (not sure what the version is, but I can check if that is really important).
AspDotNetDev
26-Sep-11 17:13pm
View
Do you mean Page Methods (which are created using the WebMethod attribute)? Also, it depends on how you are using the methods (e.g., if you are calling them from JavaScript).
AspDotNetDev
26-Sep-11 17:12pm
View
Your answer has nothing to do with web methods.
AspDotNetDev
23-Sep-11 16:39pm
View
This is not the place to ask for tutoring. Be specific with your question. Include the code that you are using and show exactly what should be happening and what is actually happening.
Show More