www.acehaid.org
TDD Workshop in Montreal August 16th
www.acehaid.org
[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!
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
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
www.acehaid.org
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.
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()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
Now is the time to hit up the keeper of the training budget.
http://weblogs.asp.net/CFranklin/archive/2005/06/16/413377.aspx
TechEd Speakers Charity Auction http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=5587400881
When Beta2 was released, I wanted to get my hands on it right away. This meant downloading it from MSDN Subscriptions since it would take a while before any CD’s would arrive. I have DSL with [read more…] |
[A DevLife post]
TechEd Speakers Charity Auction http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=5587400881
Earlier today I wrote about celebrating the VS2005/SQL Server 2005 launch while I am at DevConnections in November. Now I have found this great banner on their home page (though I admit seeing it first on fellow speaker (wow, I get to be a “fellow speaker” with Dino??!) Dino Esposito.
TechEd Speakers Charity Auction http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=5587400881