A Request Of Yahoo! Answers Code Questioners: Please Post Your Code On Geocities (Or Another Web Site)

My Yahoo! Answers hangout is the Computers & Internet | Programming & Design forum. And as much as I like it there, there’s a big problem with it: Long strings are truncated by the program.

Here’s an example:

How do i set Relations.Add to reference the XML file when creating a nested repeater in vb.net?

Hey all,
I’m trying to create a nested repeater using ASP.NET(in VB) based off an xml file. How do i set Relations.Add to reference the XML file? Everything I’ve found online shows examples using a database and having two tables of data to compare. How can I just point to the XML file and implicitly let it say which is the child?
Here’s my current version of code(that doesn’t work right):

Dim dsMenu As DataSet = New DataSet
dsMenu.ReadXml(Server.MapPath(…
dsMenu.Relations.Add(New DataRelation(”ShowMenuChildren… dsMenu.Tables(0).Columns(”Pare… dsMenu.Tables(0).Columns(”Chil…
rCreateMenu.DataSource = dsMenu

Yahoo! truncates long character sequences in order to keep their layout correct, and to prevent people from “scrolling,” or filling the space with nonsense, in an attempt to irritate viewers. To overcome the issue, you can add a space every 20 characters or so, to prevent Yahoo! truncating the line.

Unfortunately, in most programming languages, the location of white space is critical; you can’t simply insert a space wherever you feel like, or the code won’t properly compile / be interpreted. As a result, it becomes difficult to answer questions, such as the one above, because you can’t see all the code — and thus, can’t view the whole problem.

There is a simple fix to this problem, however: Save your code as a text file, post it to the Web and provide a link.

If you have a Web site, that’s great. Save your code as a text file, FTP it up to your Web site somplace, and put the link in your post.

If you don’t have a Web site, you just don’t know it: Because asking questions in Yahoo! Answers requires you to have a Yahoo! account, and if you have a Yahoo! account, you have free Web hosting service through Geocities, too. All you need to do is activate the service.

Activating Your Free Geocities Free Web Hosting

To activate your free Geocities Web hosting, make sure you are logged in to Yahoo! and then visit http://geocities.yahoo.com. To the right, there will be a button that says “Sign Up Now” under text that says “Get a site for free!” Click that button.

The next page will bear the headline “Geocities Free.” You will have to answer a couple quick questions and type some confirmation text into a textbox. Do that, then click the Submit button. [click image for larger view]

Enrollment Questions Page

You’re now at a confirmation page that contains a link, such as http://geocities.yahoo.com/{your user id}. Congratulations! You’ve got a free Geocities Web account. [click image for larger view]

Enrollment Confirmation Page

Uploading A Text File To Your Geocities Web Site

To upload your code to your Geocities Web site, make sure you are logged in to Yahoo! and visit http://geocities.yahoo.com. You will be redirected to the Geocities control panel. From there, click on the Manage tab. [click image for larger view]

Control Panel Manage Menu

Click on the link that says “File Manager.” You’re now at a new screen. [click image for larger view]

File Manager Home Page

Click the Open File Manager link. You’re again at a new screen. Click on the “Upload File” button to the right of the file list. [click image for larger view]

Upload Main Screen

Select your code text file using the Browse button for the first file box. Make sure the two checkboxes beneath the buttons are off. Then, click the Upload Files button. [click image for larger view]

Upload Files Page

If your file was successfully uploaded, you will see a confirmation page like this. [click image for larger view]

Upload Confirmation Page

Click on the File Manager link on the confirmation page. You’ll be back at the file manager list.

The link to your code file will follow the format http://geocities.yahoo.com/{your user name}/{your file name}. For example, my test text file is located at http://www.geocities.com/dhvrm/mycode.txt

That’s it! You now have code that we can see and correct.

Share This:
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • Slashdot
  • Facebook
  • DZone
  • DotNetKicks
  • Mixx
  • MisterWong
  • LinkedIn
  • Google Bookmarks
  • Yahoo! MyWeb
  • Windows Live Favorites
  • Print this

Leave a Reply