How do you stop ASP.Net Validation controls taking up precious space in the DOM when there are no errors? Don’t create complex classes and overrides. Just tweak the validation control code and some easy CSS.
Make your ASP.Net controls reference each other without having to bundle them all inside the same container. Simply use the $ sign to separate the Control Ids. See how here.
ASP.Net validation is very useful and allows developers to ensure data is correct before it gets sent to a data store. I would like to explain some best practices and suggestions for you when implementing ASP.Net validation.
GridViews are great for showing tabular, repeated data. As with all tabular data, sometimes your dataset has too many fields to show within the table. Therefore, you need to make the row “clickable” so you can show the further detail to the user. You may post the record ID to a view page or even popup the record detail in a JQuery dialog. There are many ways to show the detail so you should consider which approach is best for […]
ASP.NET data presentation controls, like GridView, Repeater, DataList, ListView, DetailsView or FormView, could be used to show data from database fast and easy, even without single line of ASP.NET server side code. But, sometimes raw data from database are not suitable for showing on web form directly. You could need additional formatting for date values, handle NULLs, change 0 and 1 to something more intuitive to your visitors, show warning if value is too high or just change styles like background color.
I’ve been asked a few times to explain how to connect to a database using code, instead of just using SQLDataSource in Design view. This article explains how to connect to a database and by passing parameters to a Stored Procedure which returns a result set.
We all use Gridview controls to show tabular data. That’s what they are designed to do. But what if you want to just display a table of data and allow the user to select one (or many) rows so that the system can associate those rows with something else.