help.net


Musing on .Net

News

Windows Phone Apps I recommend

FotoBank


FotoIreland



hit counters






Open source CMS


My blog

Irish blogs

Locations of visitors to this page Get Chitika eMiniMalls

.Net useful

Blogs I read

PocketPC

SQL

Usability

August 2003 - Posts

dScribe update

Wow! My CMS project dScribe take a great shape today when I was able to see the front-end getting the content from my database ;-)

For the moment I just have to declare this in the different sections of the test site
Scoilnet, and voila!

< dS:Content id="C1" dSPage="Homepage" dSPage="News" runat=server />

Thanks .Net to make that clever.

In the version 2 I will probably transform that as a user control.

Stay tuned for the next installment on my series about CMS dScribe, surely in few days ;-)FONT>

Posted: Aug 29 2003, 01:10 PM by help.net
Filed under:
The Unofficial blogs.gotdotnet.com main feed

Well rather then complain about the lack of a main feed for http://blogs.gotdotnet.com/ I decided to code up a little app to create a feed.  The current feed only includes the blogs running BlogX so guys like Don Box are currently not included.  I'll write more about how I created the main feed as well as release the source for the feed creator in a later post.  For the time being point your aggregators over to http://www.emxtechnologies.com/gotdotnet-blogs/mainfeed.xml and let me know what you think!

Source : Steve Eichert

Thanks Steve, already added to my blog reader !
Posted: Aug 29 2003, 09:08 AM by help.net
Filed under:
Code magazine

We are all saying good things about MSDN magazine, the last issue is sadly not the best IMHO.

But I would like to give some kudos to the excellent Code, going on better and better every month.

The last issue cover a large area, from first steps to develop on a Tablet PC to the complexity of .Net threads.

Add to this that they have most of the best .Net writers like Dino Esposito and you finish with an excellent reading.

BTW does somebody know if Dino has a blog ? It will be a fanatstic news.

September Features

  • Creating Tablet PC Applications with VS.Net Markus Egger
  • Five ASP.Net controls you might be craving Dino Esposito
  • Mobile code.Net: Exploring the .Net compact framework Nicholas Landry
  • Working with .Net threads Juval Lowy
  • Palm development with MobileVB Clayton E.Crooks
  • Creating ASP.Net controls with style Michiel van Otegem
  • Resolving deadlocks in SQL Server 2000 Ron Talmage


The last issue (Sept/Oct 2003) is not yet on their site, but I am sure it will soon, and of course I recommend to read it.

 

Posted: Aug 29 2003, 08:57 AM by help.net | with 2 comment(s)
Filed under:
Binding a DBNull with a Textbox

I just wonder if people you know this trick I use (VB) all the time to avoid the infamous DBNull headache.

MyTextbox.Text = MyReader("Field") + ""

It's surely cleaner to have a function to check DBNull but I found this more easy and quicker to type.

I am not sure if this has some performances issues, not as I am aware for the moment.

UPDATE : Of course only with String values !

Posted: Aug 28 2003, 09:32 PM by help.net | with 3 comment(s)
Filed under:
ASP.NET and xHTML Compliance

On this blog, you can find a rant about ASP.Net and the fact that it's not compliant with XHTML standards.

I read the comments, but I didn't found a suitable positive answer to this issue, sadly most of them are negative views.

The only one interesting is about this article “
Valid XHTML within .NET” and it's a good start for a solution.

You can download the source here.

Any comments ?

 

Standards: Designing For the Future

Very good article by Ian Lloyd about “encouraging unenthusiastic developers/mark-up authors to adopt forward-thinking web development methods?

Ian is a specialist in accessibility and you can check his website.

Extract from his article:

Totally CSS-based page layouts
Gone are the tables that were never intended for layout purposes (tables are for data, folks - layout grids are an abuse of the mark-up, an abuse that we’ve come to live with and accept a bit like an irritable auntie with an equally irritable terrier that visits every weekend). Now we can view such sites on a PC, a handheld device, using a screen reader and more, and we get the added bonus of quicker-loading pages.
More usable forms
The <label>, <fieldset> and <legend> elements are supported by most modern browsers, and in the right hands they can make a form far more usable and accessible. And they’re definitely semantically sound.
Data tables that work
Using elements like <caption>, <thead>, <tbody> and <tfoot>, and attributes such as summary, scope, ids and headers, data tables become meaningful to blind users accessing the content with a screen reader (rather than a jumbled mush of words and numbers).

My two cents on this part:

If I want to apply these rules (and I surely want) means that web accessibility validations systems like Bobby should evolve.
I have a site done with CSS only layout but it can't pass properly the tests.
My understanding is that Bobby expect to have the site compliant with some old browsers like IE4 or NS3.
Obviously these browsers are far away out of any CSS standards.

For the Fieldsets and Label tags I agree, but I will have the same problem with validation.

For the Datatables, regarding .Net, it will be surely a great idea to include the accessibility requirements natively.
Maybe in .Net 2 ?
For the moment, it should be possible to do so with some Repeater and some code.

 

Create Mobile Database Apps

New article by Doug Thews on Visual Studio Magazine online :

“Use the .NET Compact Framework and SQL Server CE 2.0 to give Windows CE and Pocket PC apps access to corporate databases.”

 

Posted: Aug 28 2003, 09:45 AM by help.net | with 1 comment(s)
Filed under: ,
Datareader HasRows but don't read back or forward

In my previous post I submit this 'little' annoyance I have with Datareader.

Unfortunatly Matt and Dave your answer is wrong, I already tested with.Hasrows before, I should mention it in my post.

Hasrows is a valid test but don't read any data.

So if I write

If dtr.HasRows then

Poll_Question= dtr("Question")

End If

'-- Now bind to the radiobutton list
MyPoll.Datasource =dtr
MyPoll.Databind

I will still have an error.

The solution proposed by David is probably a good one.

If you are using stored procedures (which you should), then you could have the Question be an OUTPUT parameter. That way you don't have the question unnecessarily repeated in your resultset.

If you don't choose to go that path, then you could manually create the Items instead of setting the DataSource.

if (dtr.Read())
{
Poll_Question.Text = dtr["Question"].ToString();
MyPoll.Items.Add(...);
while (dtr.Read())
{
MyPoll.Items.Add(...);
}
}
dtr.Close();

And yes David I use SP all the time, but I was just thinking that for this small control, I could avoid them.

On the second part of your answer, you still miss the first record because of the dtr.Read.

How much I regret the good ASP Recordset.movenext and .moveprevious, .movelast, .movefirst !

Why this is not implemented in .Net ?

As I say before maybe the lack of a Datasource for some web controls like Label is the source of the problem.

Something I would like to investigate is that the Label control has a Databinding event, so maybe something to find there, who knows.

 

Posted: Aug 27 2003, 11:14 PM by help.net | with 11 comment(s)
Filed under:
Datareader binding

It's surely simple but I can't figure out how I can deal with this basic stuff.

I have a web page with a poll. The choice items are coming from a SQL database, they can be just like Yes or No.

I bind the choices to a Radiobutton list.

On top of the choice items, I also have a Label webcontrol to write the question.

Because sadly Label don't have any Datasource property, I am struggling with this issue.

If I do this code (after opening my datareader)

If dtr.Read then

Poll_Question= dtr("Question")

End If

'-- Now bind to the radiobutton list
MyPoll.Datasource =dtr
MyPoll.Databind

Guess what's happen there ;-) I lost the first record because of the test which read the dtr first record.

Of course if I remove the test I have an error Attempt to read when no data is there.

I tried also to bind the radiobuttonlist first and only after bind the Label. No still the same error.

So for the moment the only way I found is to read twice the data !

 

If dtr.Read then

Poll_Question= dtr("Question")

End If

dtr.close

dtr = cmdSelect.ExecuteReader()

'-- Now bind to the radiobutton list
MyPoll.Datasource =dtr
MyPoll.Databind
dtr.close

Any idea welcome ;-)

Posted: Aug 27 2003, 07:28 PM by help.net | with 5 comment(s)
Filed under:
tysond - aka System.Object boy!

That's cool, now Tyson decide to rename himself System.Object Boy.

For my non-technical readers (and I know you're out there guys, don't worry the warden assures me you'll be able to continue to read this blog so long as you STAY CALM and TAKE YOUR MEDS), this means I'm the absolute most basic thing available.  If DataGrid girl is "Peugot 206 CC 2.0L in Sky Blue Girl", I'm a "Car Man".  If she's "Pentium 4 2.6Ghz with 512Mb RAM, 17 inch monitor and a year free internet girl", I'm "PC man".  I'm the top of the tree - you don't get any higher up the totem pole than me.  Of course I'm kind of useless and generic, but in a FUNDAMENTALLY IMPORTANT WAY.

He seems to be impress by Marcie ;-)

Sorry I can't resist I have to publish his prose ;-)

It's a strange world where one can become a celebrity of the developer world by naming oneself after a (particularly useful) library class.  DataGrid girl travels the world talking about DataGrids -- a piece of user interface that programmers can use to make neat little tables from database information.  By aligning herself completely with a single user interface feaeture, she transcends the human experience of merely speaking about a technology.  She is not merely an expert on DataGrids.  She is the DataGrid girl.  People queue for miles to meet her.  She is flown around the world to speak about her namesake.  Madonna is considering working with her on her next albumn.  Her blog gets 10 or 20 comments per article.  The last point rankles me the most.

DataGrid Girl is larger than life.  Speakers at Tech.Ed dread the thought of having a session on at the same time as DataGrid Girl is speaking as it means nobody will go to their session.

LOL ;-))

 

Posted: Aug 26 2003, 10:36 AM by help.net | with 1 comment(s)
Filed under:
More Posts Next page »