Your search for asp-net returned 4 results.

Forcing ASP .Net Validators and ValidationSummary to use CssClass

Here's something strange. If I create a validator using the following mark up: <asp:requiredfieldvalidator id="rfv_txt" runat="server" errormessage="Required" CssClass="errorText" /> and my css class is: errorText { color: purple; } My validator still renders with red text. Checking the markup, I see that ASP .Net has added an inline style ...

Read More

Type casting your User Control Class in ASP .Net 2.0+

I ran into a little bit of a strange issue today:I created a User Control that was being used multiple times on a page. It contained a few public methods and properties that allowed me to delegate loading and saving of the data to the control.Since I have a personal aversion to typing out the same thing for controls with different names, I wanted to just loop ...

Read More

DBNull is my Nemisis: Part Deux

******This is the second part of my rant about DbNull. Go here to read the first part.******Ok. So now you have a utility method that lets you check for null whether it's null, DbNull, or, if bound to a datagrid, "&nbsp;"What if you want to Convert that object, which might be null or DbNull, to a Type? What if you'd like to write it in pretty code? Well then ...

Read More

DBNull is my Nemisis

Despite what I told interviewers when looking for a new job last summer, I definitely prefer C# over Java. Having learned to program mostly in C++ with all it's (dangerous) flexibility, the fact that Java did not implicitly convert primitives to their object counter-parts (i.e. double and Double) - not to mention the endlessly long names - filled me with endless ...

Read More