Archive for the 'ASP.NET' Category

A Charity Donation Recognition System Using PHP, MySQL, JavaScript And DOM

Recently asked on Yahoo! Answers:

Divide photo in 5,000 pieces with rollover text?
we are raising money and selling support tickets. To show our progress we are going to start with a black and white image split in 5,000 pieces then as each piece is sold we want to turn it into color.

When you roll over each piece the person who purchased that support ticket will have their name show up as well as a personal message.

any opinions on how this should be built? The admin section will all be managed manually, so we’ll just need a backend for the admin person to go in and make the changes manually.

This seemed an interesting challenge to me; not difficult, but with multiple steps that no beginner could hope to properly tackle on his own without some help.

This project calls on almost all the basic skills a competent Web developer should possess: Image editing; database design and simple queries; DOM manipulation; security and back-end systems, and therefore, it gives me my first real opportunity in quite some time to address a project in full scope.

As always, I’ll have a link to a working demo and code you can download at the end of this entry.

Read the rest of this entry »

Getting Plain Text From An ASP.NET 2.0 Page For Use As An AJAX Data Source

In a follow-up comment to my answer on his AJAX question on Yahoo! Answers, mzanime2000 posed a problem faced by many ASP.NET programming beginners: how to get ASP.NET to return plain text only for use in AJAX.

Wow thanks! Pretty nice well-detailed response. Now I just hope I can get it to work with ASP.NET, I see that you used PHP in your example. One thing I still dont get though, is how Ajax invokes the SQL data when it looks like you used PHP to do the msql_connect part. And PHP is pre-processed too

ASP.NET is based around two output models: HTML and XML. The whole approach assumes you’re either going to spit out a Web page or some XML at the end of the process. Thus, all the controls, all the tutorials … everything is aimed at outputting HTML or XML. But for an AJAX data source such as the type I discussed in my previous blog entry, you need plain text.

The fix is to remove all HTML formatting from the ASPX page, and place our code directly into the ASPX page itself. That will let us call upon Response.ContentType, which will send our database results as text — which is just what our Google Maps API, and all other AJAX applications, want to see.

Read the rest of this entry »

Going To A New URL Via A Drop-Down List: JavaScript And DOM, PHP, ASP.NET

Recently, a visitor to this site asked me to expand on changing URLs via JavaScript, after reading my post on changing an IFRAME’s source via a drop-down list.

As a quick aside, I’ll do my best to answer any question that is posted in Yahoo! Answers if you e-mail it to me. There’s an envelope icon in the question; just use that to get to Yahoo! Answers’ e-mail form, send your question to dhvrm@yahoo.com and I’ll check your question out as soon as I can.

I won’t answer questions privately, meaning I will not e-mail an answer; I’ll only respond in Yahoo! Answers, on this Web site or in my Geocities adjunct site.

I answer questions because when I started out in programming, I needed a lot of help and I got it on the Internet. Now, I’m putting information back out on the Internet for other people who need it. Therefore, if you’d like my help, you need to share it with others. No private questions and no private answers, thank you.

That said, I got the person who asked me to post this question in Yahoo! Answers:

HTML code on How to link a drop down box item to a web page?

Check this url {snipped}
When somebody clicks on the name, it need to be linked to a existing web page in the site.
please provide me help.

It appears from the sample URL provided that this person only wants to go from one static HTML page to another. Which is easy enough, if we simply pirate the earlier iframe code and make some minor modifications. But to be thorough, I’m also going to address how to do this with server-side technologies, too.

Read the rest of this entry »

Update On SourceForge.net Projects: One New, One Moved

I’ve made some changes to my sourceforge.net projects.

I deleted my old SourceForge user name and changed it to the same identity I use for Yahoo!: dhvrm

The NWS Parsing Script for PHP has been reassigned to my new user name and will be modified to include several other Web scripting technologies. While I will continue to update the PHP 5 script, I will also be including a custom control for ASP.NET, additional support for ASP.NET, and possibly an AJAX library.

The revised PHP library will also resolve a bug reported in the PHP 5 class. Unfortunately, I was never notified by e-mail about the bug; SourceForge kind of dropped the ball on that one, and I’ve kind of dropped the ball by ignoring the project for so long.

I have also created a new project, for working with the free GeoLiteCity IP geolocation database from MaxMind.com.

At this stage, the project consists of a PHP 5 class that imports into a MySQL database the CSV files provided by MaxMind. It will eventually include additional classes for working with the binary data file they provide, as well as ASP.NET and AJAX components.

The GeoLiteCity project is awaiting SourceForge approval as of this writing.

Good, Free Web Hosting Companies

A common question on Yahoo! Answers is where to find good, free Web hosting companies. More often than not, the request is that they also be ad-free.

I can recommend the following Web hosts because I have used them all for various purposes. Each has its limitations, but remember, you get what you pay for, even on the Internet.

A quick aside on free domain names: There are no free domain names. At least, none that are worth the aggravation. (For total n00bs, a “domain name” is like this site’s dougv.com, or yahoo.com, youtube.com, whatever.com.)

Read the rest of this entry »