15,896,111 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 Gregory Gadow (Top 85 by date)
Gregory Gadow
25-Feb-14 15:06pm
View
Many thanks!
Gregory Gadow
5-Feb-14 11:49am
View
Reason for my vote of 2 \n There really isn't anything here that three minutes of
Gregory Gadow
24-Jan-14 9:53am
View
At a guess, you are using a class variable of some kind before initializing it. Without seeing your code, though, it is impossible to be any more specific.
Gregory Gadow
26-Aug-13 10:38am
View
The problem is almost certainly one of padding. I cannot tell, though, without seeing your HTML and CSS.
Gregory Gadow
9-Aug-13 11:52am
View
D'oh! I've been so focused on web programming recently that I.... anyway. Let me post another answer for you with code.
Gregory Gadow
25-Jun-13 9:14am
View
I'm not sure what is your question.
Gregory Gadow
5-Jun-13 12:42pm
View
No problem other than my thinking I had linked you on the first go-around :)
Gregory Gadow
5-Jun-13 12:28pm
View
I linked you on the article; this time it stuck.
Gregory Gadow
5-Jun-13 11:18am
View
Tip posted:
http://www.codeproject.com/Articles/603102/Persist-JavaScript-changes-on-postback
Gregory Gadow
5-Jun-13 9:34am
View
Yup, got it working now. I poked around CP and couldn't find a solution which is why I asked the question; I may post my code as a tip here so others can find it. Thanks!
Gregory Gadow
24-Apr-13 16:11pm
View
And, I don't think that later Frameworks can be used in place of earlier ones: a machine with the 4.0 Framework (VS 2010) cannot run an application written for the 2.0 Framework (VS 2005.) The Frameworks are not mutually exclusive, and you can have several on the same machine at the same time.
Gregory Gadow
24-Apr-13 16:08pm
View
Open up your application in VS and double click the "My Project" icon in the Solution Explorer (or use the menu and use Project -> MyApp Properties). Select the Compile tab, then the Advanced Compile Options button in the lower left. A drop-down at the bottom of the form will tell you the framework your application links to. All target machines MUST have that framework to run. If you are using VS 2005, I believe it will default to Framework version 2.0. And yeah, I meant DLLs :D
Gregory Gadow
7-Dec-12 11:21am
View
This is the COM way to hide an application's window. It does not hide the application from Task Manager, which is what the person was asking about.
Gregory Gadow
28-Nov-12 11:23am
View
Clean and elegant.
Gregory Gadow
26-Nov-12 15:44pm
View
I deleted my answer after copying your function and testing it in VS. Your problem seems to be with the algorithm itself.
Gregory Gadow
23-Nov-12 12:38pm
View
You are welcome.
Gregory Gadow
20-Nov-12 12:50pm
View
Your title says "web form" but your question is about "winform." These are different, which is it?
Gregory Gadow
19-Nov-12 15:58pm
View
XML (eXtensible Mark-up Language) is just a text file that follows specific rules. It is very flexible; there were a few versions of Excel that used XML to store spreadsheets. A full tutorial would be well beyond what can be given as a quick answer, I'm afraid: you will have to do some research to find a solution that works best for you. As for "serialize" and "deserialize", those are just fancy words that mean "convert to and from a text format that can be moved between different types of data structures" including files.
Gregory Gadow
19-Nov-12 13:43pm
View
Is the delay occuring when the page first loads, or after the button is clicked? At a glance, the issue is how long it takes your Javascript method to assemble the PDF and deliver it. Addressing that has nothing at all to do with ASP.Net.
Gregory Gadow
20-Jul-12 10:52am
View
Oops, my bad: I didn't notice that you had this flagged as SQL-CE. That version of SQL does not support programmability, so ignore what I wrote above. Given that, I would do what you already thought of and put each query and command in a separate function. Having only one instance where you are deleting a league will make sure that updates to your code are consistent (only one place to edit the delete command, rather than a dozen.)
I would recommend functions so that you can pass a result value back to the caller. Commands like delete or insert could return a boolean value indicating success, and queries could return a table object with your results. SQL-CE does support parameters, so I would still use those rather than hard-coding your values: it is a good habit to get into, and will probably have an efficiency benefit similar to what you see in a full feature SQL server.
Gregory Gadow
25-Jun-12 13:58pm
View
That's what I thought, but figured I'd check. Thanks for the answer.
Gregory Gadow
5-Jun-12 12:35pm
View
What is the actual problem you are having?
Gregory Gadow
25-May-12 16:50pm
View
Are you trying to hide the cursor (the mouse pointer) or the caret (the blinking bar that indicates the current position within the text)? And why?
You cannot hide the cursor, although you can use the control's Cursor property to change the cursor that appears when the user hovers over the control. There really is no effective way to hide the caret, but you can use the control's ReadOnly property to make it... well, read only. That means the user cannot edit what is there.
Gregory Gadow
18-May-12 15:38pm
View
Result is defined at the function level. Without an explicit assign at declaration, VB.Net automatically assigns it a value of False, making the assignment within the Try block redundant.
Gregory Gadow
18-May-12 15:37pm
View
First, if I give it no explicit initial value, VB.Net will assign it a default value of False. Second, any change to a variable will persist within its scope. The variable is declared at the function level, so any change within the function scope will persist within the function scope, even if that change is made within a narrower scope like a Try...Catch block.
Gregory Gadow
15-Mar-12 15:21pm
View
Your choice of framework will not make any difference. Even if you could interrupt the OS bootup -- and most operating systems will not let you do that -- the system will not be in any state capable of executing your code, because it has not finished booting.
Gregory Gadow
1-Mar-12 17:27pm
View
The project is for a desktop content publisher app, where users unskilled with HTML can compose and edit rich text documents for our website. The app stores the content to a database along with various meta-data, and the content publishing infrastructure on the website picks up from there. This app replaces a much clumsier, less flexible web-based system (not my work) that has been in place for several years. The content database has over 1400 articles that must be backwards supported.
Given the lack of affordable WYSIWYG HTML editor components, I made the decision to use the System.Windows.Forms.WebBrowser component reset into editor mode.
Gregory Gadow
28-Feb-12 9:22am
View
I thought you were being facetious by saying the fault was with them being Microsoft Windows common controls. Then I read the Knowledge Base article and saw that you quoted Microsoft itself. Five stars for making me shake my head at MS' cluelessness. And, of course, for your good answer.
Gregory Gadow
30-Jan-12 13:59pm
View
If all you want is a list of open forms, you can use the MenuStrip, which you probably already have on the MDI (that and the StatusStrip are the typical exceptions to the "no controls on a MDI" rule.)
Add a top-level menu on your MenuStrip ("Windows" is the traditional label.) On the ToolStrip control, find the property MdiWindowListItem and put set it to the name of the "Windows" menu. Now, the operating system will keep track of the open child windows as menu items under "Windows", allowing the user to change from one form to another by selecting the desired form. It will even put a highlighted checkmark next to the active window. Because this is done at the bottom of the menu, you can add other menu items on "Window" as well, such as options to reorganize child forms to cascade or tile them horizontally or vertically. Keep in mind that the Text property of the child forms (the part that is displayed in the form's title bar) will be the text for its menu.
Gregory Gadow
24-Jan-12 10:02am
View
Brilliant, works like a charm. Many thanks!
Gregory Gadow
5-Oct-11 11:24am
View
That is the usual way, yes, but tampering with the browser's history without the user's consent is not considered legitimate. I believe several browsers have disabled this ability because it has been used maliciously.
Gregory Gadow
5-Oct-11 9:37am
View
The first thing to check is: are the line breaks you want being given to WBHTML in the first place? Try adding Debug.WriteLine(WBHTML.DocumentText) after the call to Navigate; it may be that the text box is faithfully displaying exactly what it is being given to display.
Gregory Gadow
17-Sep-11 2:24am
View
The idea will work on any page, but you will have to customize it to fit the data input boxes that are specific to that one page.
Gregory Gadow
16-Sep-11 9:38am
View
Why is it necessary to place the document IN a page? Why not just serve the document as a file?
Gregory Gadow
7-Sep-11 16:26pm
View
D'oh! Yup, that works: COALESCE(RepCode, '') = COALESCE(@RepCode, ''). One of those solutions that is too obvious. Thanks.
Gregory Gadow
22-Jul-11 13:05pm
View
My HTML code is a standard table.
Gregory Gadow
25-Jun-11 0:08am
View
Like I said, I can get the summaries for individual grids in each grid's footer. What I need is an aggregate sum of all the grids elsewhere on the page.
Gregory Gadow
20-Jun-11 9:45am
View
So your question is about SQL and database management, not ASP.Net. You may want to change the tags on your question, then: you will likely get a more meaningful response when people know what you are asking about.
Gregory Gadow
8-Jun-11 10:14am
View
Compatible to what? The pointer, or the value being pointed to? Also, I'm pretty sure that VB.Net does not have UCHAR or C style pointers.
Gregory Gadow
8-Jun-11 10:14am
View
Deleted
Compatable to what? The pointer, or the unsigned character being pointed to? And in VB? That language does not have a UCHAR datatype, nor does it use pointers.
Gregory Gadow
17-May-11 0:23am
View
Trick question: if you are eliminating numbers that have already been selected, then by definition you are not selecting random numbers.
Gregory Gadow
4-May-11 11:11am
View
My apologies. I had to do this very same problem in one my early programming classes. Knee-jerk reaction, sorry :-)
Gregory Gadow
4-May-11 11:02am
View
I didn't realize this was possible: I've been soaking in the Framework too long. Thanks.
Gregory Gadow
4-May-11 11:00am
View
My understanding is that the API changes the system metrics and so would change every scroll bar, not just the control. It has been a very long time since I have done any API stuff, though.
Gregory Gadow
3-May-11 10:34am
View
I'm not sure why, but manually adding the MIME type to the new site's root web.config did the trick; it is nowhere to be found on the old site. Many thanks.
Gregory Gadow
2-May-11 16:45pm
View
That was actually the first thing I checked: I have custom HTTP filters for delivering PDF and a few other document types. Neither the old nor the new servers have references for XFDF, and yet the old server delivers them up with nary a complaint. That's why I'm so frustrated.
Gregory Gadow
19-Apr-11 9:36am
View
Yup, this is my preferred solution. I believe it has the added advantage of protecting against injection attacks.
Gregory Gadow
2-Apr-11 0:34am
View
That's what I thought would be the case, thanks for the information.
Gregory Gadow
28-Mar-11 12:37pm
View
I looked into that, too. This site does not have AJAX installed currently, and it will be shutting down within three months anyway. The new site is Windows 2008, which supports MaintainsScrollPositionOnPostback and makes my question moot. I was hoping there might be some kind of quick fix, but if I have to say "it will be fixed in the new version of the site," I can.
Gregory Gadow
23-Mar-11 12:07pm
View
That's what I was afraid of. It makes sense to generate a guaranteed unique id when merging pages, but it's a (redacted) nuisance. Unfortunately, none of the solutions mentioned in your link offer anything I can implement. Thanks for the info.
Gregory Gadow
15-Mar-11 18:35pm
View
I have to agree with digital man and the others. This is a matter of contract law, which is very complex in most countries. GPrime69 and others in the same situation can end up with a lot of grief if they don't get proper advice, I've seen it happen far too many times.
Gregory Gadow
14-Mar-11 11:51am
View
Follow up: Turning on tracing and using HttpContext.Trace.Write to output checkpoints showed that my custom GetUser function was getting called as much as 14 times (!!) every page call, not counting a DispatchLink control that retrieved user information and rendered according to permissions; some pages had dozens of DispatchLink controls. The fix was to cache the data rather than retrieving it each time. The control was rewritten to use that cache. The site is running much quicker, thanks again.
Gregory Gadow
11-Mar-11 11:49am
View
Ayup, you're running two for two. After enabling the trace, I found out that the problem was all in the rendering. Poking at the code behind the scenes indicated the GetUser method from my custom MembershipProvider. I will focus on getting that optimized and figuring out why it is so bloody slow on this one server. Thanks again.
Gregory Gadow
10-Mar-11 20:54pm
View
Excellent, thank you. I will look those over when I get back to the office tomorrow.
Gregory Gadow
10-Mar-11 20:53pm
View
The two sites are on different servers, and the styling is different. Images and page content are identical. Both sites are being accessed on the same desktop computer side by side. The lag occurs even when there is no database access, just serving up a static page.
Gregory Gadow
10-Mar-11 9:51am
View
http://www.codeproject.com/KB/aspnet/serversidetoc.aspx
Gregory Gadow
9-Mar-11 12:19pm
View
Many thanks! Request.Filter does the trick, and I'm writing out my solution as an article.
Gregory Gadow
7-Mar-11 15:40pm
View
That is a very intruiging idea, thanks. Never heard of that property before, and the BeginRequest thing looks interesting.
Gregory Gadow
9-Feb-11 15:30pm
View
And why am I trying to explain these things to two platinum members? :doh:
Gregory Gadow
9-Feb-11 15:26pm
View
A lot of CP contributors do not have English as their primary language, and it can show. I've seen (and sometimes made) edits to correct misspellings and grammar, fix punctuation and otherwise make questions, answers and articles easier to understand. Like any power, though, the ability to edit can be abused, which is why revision history is publicly available.
Gregory Gadow
9-Feb-11 15:04pm
View
@Henry - If an answer or article has been edited, there will be a link where you can look up the revision history: note the "Revision 3" link underneath Yusuf's answer. Malicious edits and deletions tend to be caught quickly.
Gregory Gadow
9-Feb-11 13:29pm
View
Yup, that works! Thanks.
Gregory Gadow
24-Jan-11 14:02pm
View
I would agree, with the additional advantages of reuse and flexibility. A single file can service the whole site, or you can break it up into a file for structure and one or more for colors. You can also create separate files that will be used depending on the user's browser, allowing you to move all of the IE 6 quirks into one document, Opera quirks into another, etc.
Gregory Gadow
24-Jan-11 10:12am
View
It would be helpful to see what the actual error message is. My first thought is that the image file is in use from something else in the app.
Gregory Gadow
30-Dec-10 16:30pm
View
Do you have any suggestions for how to create a list of persistable, displayable data? That is what I need; it doesn't have to be a ListBox control.
Gregory Gadow
30-Dec-10 16:01pm
View
Added some code to my question. Hope it helps.
Gregory Gadow
28-Dec-10 16:10pm
View
Problem solved with the ingestion of extra caffeine and the use of an OutputCache directive. Thanks anyway.
Gregory Gadow
28-Dec-10 15:58pm
View
Nope. With or without the query string, I am passing the exact same same value into GenerateData, and the exact same document is being passed back out. The ONLY difference between using and not using the query string is the existence of the query string itself.
Gregory Gadow
30-Nov-10 9:14am
View
Seeing the actual text of the error would be helpful. Is the data conversion problem occuring in one of the cmd.Parameters.Add statements, or when you execute the INSERT?
Gregory Gadow
18-Nov-10 10:52am
View
I'm sure such code exists. Do you have a question?
Gregory Gadow
27-Aug-10 21:02pm
View
Deleted
No argument from me about extension methods, I've written two articles about them:
Extend the .NET Library with Extension Methods
[
^
] and
Extending Forms.Control: Lock and Unlock
[
^
]. Even so, extension methods are pretty arcane, and not something that a lot of programmers normally deal with.
Gregory Gadow
27-Aug-10 12:26pm
View
The test site is on a different server entirely, one that sits inside our firewall. Other than that, the hardware is identical to the live server.
Gregory Gadow
27-Aug-10 11:54am
View
Thanks for the suggestion, but it didn't work. I used SSLDiag to create a temporary certificate (MakeCert has been memory-holed, apparently) and now the test site is running on SSL, despite much pissing and moaning from IE8. I ran through the tests and... still not getting authenticated. But, at least I've gotten rid of one more variable, thank you for that.
Gregory Gadow
27-Aug-10 10:35am
View
That would have been my first choice, but I haven't been able to find out how to do that for a website (desktop apps and the assemblies running on the website, that I can do.) But there is nothing in my custom code that relies on whether the site is accessed by http or https, so I don't think that is the problem.
Gregory Gadow
19-Aug-10 12:41pm
View
If TextBox2 holds the domain that you are looking up, then why would you be passing TextBox1.Text? Also, if the value passed to GetHostByName is not a valid, registered domain, you will get a socket exception: make sure that you are entering a valid value for testing.
Gregory Gadow
16-Aug-10 13:02pm
View
I don't think you read my question correctly.
I have some text -- say, a list of the rules for creating passwords -- that is used on several different pages. Rather than have this text actually written on different pages, I create a static text file and include it into the page. This way, I have a single file that can be updated and I eliminate the risk that different pages will drift out of synch.
My question is about the best way in ASP.Net to include that static text file in my pages.
Gregory Gadow
11-Aug-10 11:00am
View
Eh, slow day at work.
Gregory Gadow
22-Jul-10 13:57pm
View
The problem with resource strings is that, you will need to rewrite your application when -- not if -- that data changes. I'm not sure how it would affect performance, as I've never tried that approach.
Gregory Gadow
22-Jul-10 9:30am
View
Who is this "you" of whom you speak? If you are asking about a specific article, you should put your question in the comments section of that article.
Gregory Gadow
15-Jul-10 23:47pm
View
That shouldn't be a problem, as the extended text gets used as both the anchor's title attribute and (in some cases) a label with a description after the link. Carriage returns should work fine in both those situations. Thanks!
Added: Works perfectly. The line breaks are used in the text, but that doesn't cause any problems; I can trim them out in my web control if I want to be picky. Thanks again.
Gregory Gadow
24-Jun-10 14:04pm
View
When I responded 4 hours ago, the question was quite different.
Gregory Gadow
15-Jun-10 10:15am
View
My apologies for not responding sooner ([censored] job.) Thanks, this is exactly what I was looking for.
Gregory Gadow
28-May-10 9:28am
View
I expect that the problem is in the regular expression; it would be helpful to have that.
Gregory Gadow
13-May-10 16:07pm
View
Excellent, that is what I was hoping to hear. Thanks for the response.
Gregory Gadow
11-May-10 9:35am
View
Ah! So if the section is encrypted and I change a value, the configuration manager will automatically encrypt it? That is exactly what I wanted to verify, thanks.
Show More