Category Archives: dotNET

TDD Workshop in Montreal August 16th

GUVSM, one of the .NET User Groups in Montreal, is hosting a full day workshop on Test Driven Development on Tueday August 16th. The workshop will be taught be Scott Bellware, from Austin Texas, who has been doing TDD training for a while and is a passionate advocate of TDD. There will also be one section of the workshop taught by Mario Cardinal (one of the new Architecture MVPs) and Etienne Tremblay who has been doing a ton of work with Microsoft on VS 2005 Team System. They will do their session in English also.
 
The workshop is only $50 and even includes an MSPress book on OOP in .NET.
 
There is only room for 30 and as of Friday, it was half full.
 
More details here on Guy Barrette’s blog (http://weblogs.asp.net/guybarrette/archive/2005/07/15/419510.aspx) and at www.guvsm.net.
 
The workshop will be in English.
 
If you can swing the day, I’d highly recommend it!


www.acehaid.org

Web UI trick with ImageButtons inside of Data Repeaters

[this is for v 1.1]

On a web page I have an ImageButton with some server side action to take place when it is clicked. But there are scenarios where I would like it to be disabled. The Enabled property disables any command action, but you still get the “index finger” cursor when you hover over the icon. I didn’t even want that. I think that’s pretty confusing because it still looks like the user can *do* something.

To make it more interesting, I have this happening inside of a Data Repeater. Here is how I got this to work.

Just after the ImageButton, I placed an <asp:image> with the same image as it’s source. The default “visible” parameter on this is False. Since I am doing this in a Repeater, I am hand coding it, so remember to add runat=server. In my case, I actually have a different image, so it is extra obvious to the user that the state of the icon has changed.

By making the visible property false, not only is the image not visible, but it does not take up any real estate on the page.

<asp:Imagebutton id=”CheckOut” runat=”server” ImageUrl=”images/checkout_red.gif” AlternateText=”Check Out”  CommandName=”CheckOut” />
<asp:Image ID=”CheckOutNoLink” Runat=server ImageUrl=”images/checkout_small.gif” Visible=False/>

In the repeaters “ItemCommand” event, when the state calls for the inactive image I just flip the Imagebutton’s visible property to false and the Image control’s visible property to true. Again, by making the Imagebutton not visible, it no longer takes up the space on the page, and the Image slides over to fill in the hole that the Imagebutton left behind.

              CType(e.Item.FindControl(“CheckOutNoLink”), System.Web.UI.WebControls.Image).Visible = True
              CType(e.Item.FindControl(“CheckOut”), System.Web.UI.WebControls.Image).Visible = False

 

I’m sure this has been done plenty of times before, but I didn’t intuit the solution at first and couldn’t find anything on google, so here ya go!



www.acehaid.org

Windows 2003 Server SP1 and ASP.NET Applications

Oh, more lost hours in admin hell. Here’s some pointers if you are upgrading your web server to SP1.

– Remember the firewall problems when moving XP to SP2. You will have them here!! <g> Pay attention to what ports are opened up.

This article is a good reminder of that wiht a section on what applications to allow through the firewall on the remote server

http://support.microsoft.com/default.aspx?scid=kb;EN-US;833977#27

www.acehaid.org

In addition to the Tracing talk, a taste of CodeGen at Vermont.NET on Monday

To appease the masses (okay it was just Dave Burke’s loud whining), Kathleen will talk a bit about Code Gen at our VTdotNET meeting on Monday night. Her regularly schedule presentation, Tracing in VS2003 and VS2005 is a 90 minute talk. So we will take a break after that talk (app. 8:15 for the break) do our raffles, etc, then Kathleen will spend 1/2 hour talking about some high level CodeGen concepts and also how Generics in VS2005 is going to have an incredible impact on Code Generation. We will probably continue the conversation at a local pub in downtown Burlington.

So check the website  – which I will be modifying shortly – for the new schedule.

We have a box of goodies from APress – lots of books (including Kathleen’s Code Generation in Microsoft.NET book), t-shirts and more and I’ll also be raffling off a copy of Infragistics NetAdvantage!

Remember that we have our .NET Newbie session (OOP: Inheritance & Polymorphism in .NET) at 5:30.

Thanks to INETA for bringing Kathleen our way.

She heads up to Montreal to do a full 2 hour Code Gen talk at GUVSM on Tuesday night (in English :-)).

www.acehaid.org

Free 17-hour self-paced ASP.NET training course from Microsoft Learning (limited time offer)

Free OnLine ASP.NET Training

 

Are you looking to learn to create ASP.NET Web applications with Visual Studio.NET? If so now is your chance to get 17 hours of hands-on ASP.NET training for free from Microsoft Learning.

For a limited time only, Microsoft Learning is offering Developing Microsoft ASP.NET Web Applications with Visual Studio.NET, a 17-hour self-paced online training course, for free ($349.00 value).

www.acehaid.org

Kathleen Dollard coming to Vermont.NET next week

Many moons ago, when I made the transition from FoxPro to Visual Basic, my first resource I hit up was the newsgroups. There was Kathleen Dollard not only present but answering questions and she was the only woman’s name I saw anywhere in those groups. She was very nice and answered some of my really dopie newbie questions. I emailed her offline and said that i really appreciated her presence there, I didn’t feel like such an alien.

Years and years later, I have now developed a wondeful friendship with Kathleen, but only get to see her at random events like TechEd, DevConnections or the MVP Summit. So I am truly thrilled that she is coming to speak at Vermont.NET on Monday – thanks to the fact that she is an INETA speaker! She will be flying in on Saturday and so we get to play for a few days before the meeting.

She will then be heading up to Montreal to present at GUVSM on Tuesday night – again, courtesy of INETA. If I can get enough work done, I will go up with her and give her a mini tour of that beautiful city.

Kathleen will be presenting on Tracing in VS2003 and VS2005. I am not great at tracing, so when Kathleen says it sucks in VS2003 and has been overhauled and is wonderful in VS2005, I believe it! And I certainly need to get this lesson myself.

We will also have our 2nd .NET NEwbie session on Monday. After Laura Blood’s wonderful job at beginner OOP in .NET in June, Rob Hale from IDX is going to follow up with a presentation on Inheritence and Polymorphism in .NET.



www.acehaid.org

Error: “The row doesn’t belong to the same DataSet as this relation”

This .NET error message is misleading (although in the long run, it is still correct) and brings up nothing at all in Google, so I am going to put it here again: “The row doesn’t belong to the same DataSet as this relation”. Miseleading because I was focused on the row.

This is the System.ArgumentException error that will be thrown when you attempt to either XMLWrite a DataSet with tables that are related through a DataRelation, or when you attempt to GetChildRows on one of the rows of the parent table.

The error will happen if you have forgotten a key line of code in setting up a DataRelation  — that is to attach the DataRelation that you have just created to the DataSet.

Dim ds As DataSet = GetSomeData()
Dim rel As DataRelation = New DataRelation(“sitestodocs”, ds.Tables(0).Columns(“ID”), ds.Tables(1).Columns(“ParentID”))
rel.Nested =
True
ds.Relations.Add(rel)   <– this is the likely missing code!
Dim dr as DataRow=ds.Tables(0).Rows(0)
dim tbl as DataTable=dr.GetChildRows(rel)

This is for VS2003. The documentation says that the exception’s message is “”The relation and row do not belong to the same table”. I wonder if that would have shortened the time that it took me to figure out my really stoooopid mistake. So hopefully, this little bit of google text will help the next person who is having a similar brainf*rt.

www.acehaid.org