@bobnoordam

Category: ASP.NET Webforms

Maintaining vertical scroll position on an ASP.NET GridView across postbacks

Our mission Here is what we want to archieve with a standard ASP.NET gridview; We want scroll bars to scroll vertical in a potential long list When a row is selected in the gridview, we want to maintain the scroll position in gridview. (de default behaviour would be for the grid to jump back up […]

Raising an event on a usercontrol, and subscribing to it from an ASPX page

This is a minimalistic demonstration on hooking into an event risen by a usercontrol. The main page subscribes to the event on the user control, and once the usercontrol raises a postback the event data is retrieved. User control code using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace UsercontrolEvents { […]

Passing data to an SqlDataSource on a user control from code

This code snippet demonstrates how to programmaticaly set a parameter on a user control, and bind that paramter to an SqlDataSource that has been configured at design time. The key to this functioning is a method in the usercontrol that sets a private field on the user control, and triggerin the DataBind() event on the […]

ASPxImageSlider – Resize slider for different devices

This code sample shows how to resize the ASPxImageSlider control for different devices and screen resizing. (thing rotating your tablet). The slider exposes a client side ID (ClientInstanceName = “imageSlider”) which can be hooked into with a little javascript. While this solves the basic problem, of having the slider react to different screen sizes, you […]

Scaffolding for an ASPxGridView with Select button using custom callbacks

Emulates the behaviour of the standard webforms grid, with a view where each line has a button that can be used to ‘select’ that line. This should make transition from the built in gridview to de ASPxGridView very easy. The click is processed server side It is not possible to select more then one line […]

Page and control level validation using javascript with asp.net

This sample is a complete minimal implementation of client side verification of inputs before a pass to the server is made. Verification is done on control level with the onblur() event, and on page level when the form is submitted. This validation is faster then round-tripping to the server for each event, especialy with large […]

Accordeon control

The accordeon control is part of the Ajax control toolkit and offers a series of tab-like sections, of which one is expanded at a time. Below is a minimal use sample of how to deploy the control. The ajax control toolkit can easily be installed from the NUGET menu within visual studio. Markup <%@ Page […]

Next Page » « Previous Page