You have a collection of objects. You want a subset of that collection. Instead of making another SQL call to the database or using programming code to create a filtered subset of your original collection, you can accomplish this simply …
Category: Microsoft Visual Studio
Microsoft Visual Studio – ASP.Net How to Pass a Wildcard Parameter to a Table Adapter Query
If you are not using a stored procedure for you table adapter, then the answer is DON’T!!
I have done a lot of research and have found no perfect answer. Trying to pass ‘%’ to the fill method or embedding …
Microsoft Visual Studio – ASP.Net Error in IE 9 When Using ReportViewer : No Such Interface Supported
While I was debugging in Visual Studio 2010, I come across this error when working with an aspx page that has a report viewer control. This only happens with IE. My report displays, but as soon as I click a …
ASP.Net – How to open a new browser tab from button click event on server side
If you want a new browser tab to open (without pop warnings) and you want to do it server side, the following is the best approach I have seen and works great!
Instead of response.redirect in your button click event, …
ASP.Net – How to use expression binding on client side for appSettings, ConnectionStrings, and resource files.
To bind your label control on your aspx page with a value in your web config or resource file, you can use expression binding. The value is retrieved from the named element within the <%$ … %> tags:
Get data …
ASP.Net – How to add a adRotator with a timer event to auto refresh an ad at regular intervals
The following client side code demonstrates placing an adRotator control onto an AJAX UpdatePanel. The ad would randomly change whenever the browser is refreshed. To simulate this automatically, a Timer control is added with an interval of 5 seconds. Every …
Microsoft Visual Studio 2010 – Generic IComparer
I have blogged at one time on an IComparer class that you could use to sort a property in an object within a collection http://www.jamesandchey.net/?p=601.
The downside was that the name of the object was hard-coded in the IComparer …
ASP.net – Sorting a gridview where datasource is bound to a list of collection of a class object
Sorting by column on a gridview when the datasource is bound to a list of collection of a class object presented quite a challenge. Since I did not use the wizard of the gridview to assign my datasource via the …
ASP.Net – How to control client-side functionality based on triggered event (i.e. What button was clicked)
Let’s say you have a scenario that whenever a button event or any event for the matter is raised on the client-side you want to display text in a label on the screen that says something like, “PROCESSING… PLEASE WAIT.” …
ASP.Net – How to pass a variable from one aspx page to another aspx page
Let’s say I derive a value from a RadioButtonList control and I want to pass it to another ASPX page that I am going to redirect to.
1) I first build a string and wire together that ASPX page I …