.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Extend ASP.NET: Simplify Data Binding In ASP.NET 2.0 With Our Custom Control

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

The wwDataBinder control addresses simple control data binding--binding simple form controls like textboxes, checkboxes, and the selected values of list controls to individual data or object values.

Rick Strahl

MSDN Magazine December 2006

View Complete Post

More Related Resource Links

Extreme ASP.NET: The Only Data-binding Control You'll Ever Need


Fritz Onion demonstrates how the ListView control in ASP.NET 3.5 makes data-binding tasks easier with support for styling with CSS, flexible pagination, and a full complement of sorting, inserting, deleting, and updating features.

Fritz Onion

MSDN Magazine March 2008

Cutting Edge: Custom Data Control Fields


In ASP. NET 2. 0, the GridView and DetailsView controls are designed to work together. They don't merely provide complementary services, they also share a number of helper classes and components. The output of the GridView control consists of a sequence of rows, each with a fixed number of columns.

Dino Esposito

MSDN Magazine January 2006

Data Binding: Give Your Everyday Custom Collections a Design-Time Makeover


In this article, Paul Ballard shows how you can provide data binding support for your custom collections to enable sorting, searching, and editing in as simple a manner as possible. In addition, he shows how to make all of these features available in the Windows and Web Forms Designers, just like an ADO.NET DataSet.

Paul Ballard

MSDN Magazine August 2005

FormView custom data binding problem

Hi there,   I'm using VWD 2010 ASP.NET 4.0 and SQL Server 2008 Also I have login page with the ASP.NET configuration   one of my page has FormView with Update feature   Evryting works fine user login go to my FormView page and update the record.   Now I created a simple function   Protected Function GetUserName() As String        Return User.Identity.Name    End Function   and one of my coloumn call EditedBy   I replaced the Bind("EditedBy") field binding with   Custom binding GetUserName()   When user update it show the current user login name on the screen But it won't show in the table itself (it show null value when i do select statement)   I used to do this with ASP.NET 2.0 with no problem?   How do I fix that?   Thanks, Oded Dror  

Problem binding business objects to custom user control properties

I have created a user control (supplierPicker) intended to allows a supplier database to be searched and a supplier selected. I want to be able to use this control in a number of other user controls, by binding the suppplierID property of the supplierPicker to a supplierID property in a business object, which is set as the datacontext of the parent user control. When I do this, and there is a supplierID specified in the business ofbject, the binding sets the supplierID in the supplierPicker control and it shows the correct supplier name in the textbox. However when the supplierID DependencyProperty is changed from within the supplierPicker the newly selected supplier name is shown in the TextBox, but the SupplierID does not propogate back to the business object. Other controls on the parent form work fine, so the binding to the business object seems to be ok. Any pointers as to what I'm doing wrong here would be grately appreciated.  This one has been driving me nuts for days! Snipped code for the supplier picker:         public partial class SupplierPicker : UserControl, INotifyPropertyChanged     {         public static DependencyProperty SupplierIDProperty;         public event PropertyChangedEventHandler PropertyChan

Binding a DVDropDown control to a XML data source


I'm having a heck of time figuring how to get my DVDropDown control to display items from the SoapDataSource (SOAP web service) or XmlDataSource (REST).


If I create a data view for the same data sources, I can see the data just fine, but when I go to Data Fields dialog, I can select the data source in the dropdown but in all cases, the two other dropdown to pick the value and display text are blank and there's nothing for me to select though I know there should be columns available for selection.


I've also tried manually coding those parameters, accounting for the possibility that I may need fully qualified XPath to get to the column itself but that causes an error.


What could I be missing?



Binding to an observable collection in a custom WPF control


Hi everyone,

I'll first explain a bit what I'm doing so that the code paste will make a bit more sense. I'm creating a circular menu control for Microsoft Surface (this question is far from Surface specific though, but otherwise this type of control wouldn't make sense :) ), it has some 'pieces' which are all buttons. I've created a 'Menu' control which contains the menu items, I made a custom control for these items (so I could add them to the menu within XAML), and I made a Button control which actually does the drawing of the path etc. I've done this in this specific way because the angle of the button's path will depend on the number of pieces within the menu. Anyway the above all works fine and dandy and I'm happy with the result. However now I'm trying to get all of this to work.

What I want to do is to use MVVM in my application and bind the MenuItems to a command in my ViewModel. So I have an AdminToolbox which is a view containing the menu and there's an AdminToolboxViewModel which is the ViewModel with the command and the items that I'd need to bind to my menu to create the menu items.

Some code pastes:



How to create custom control in .net which can retrive data from sharepoint list and redirect to sit


Hi help me!

I am strugling this problem!

My requirement is I need to create a custom control which need to retrive data from sharepoint list, The list contain some sites information like Title, url, Scope my requirement is i need to display sites Title in my custom control and when i click on title (site name) in custom control it need to be redirect to that site and whenever list data updated automaticaly custom control data also need to be apdated automatically .

SharePoint 2010- Custom Fields Like Rating Control- Need Suggestion on Saving Data


Hi All,

I am in process of Developing a Custom Field for Rating control. Requirements are below.

1) This field will be used for Creating survey

2) It will be called Rating control with Attribute ( some enhancement over out of box rating control)

3) Respondent will rate each attribute for 1 question like

                Action: 3

                Comedy: 5

                Thriller: 7

I need suggestion on  How to save data for above Requirements. I have designed control and it works fine. Only thing I need help on How to and Where to Save data related to answer?


Thanks in Advance



Pathik Rawal Blog: http://pathikhrawal.wordpress.com

Need help on Data binding with DPs and Control Loaded event



I have a very interesting issue and i have been breaking my head on it since a long time.

I am new to WPF and related things like MVVM and all.

I have a window in which i place a user control which hosts a TabControl inside it.

This tab control has Custom Radio Button and Combo boxes which expose few Dependency Properties, Now while these custom controls are loaded author checks for the values and does 'something particular' which is intended behavior. However in my case while the control is being loaded the DPs have null values. I see the DP property changed events being fired post Load of that control only in my case. It works okay on other windows.

This is kind of strange to me as I would expect that the DPs would be bound to related values before the control gets loaded, but i dont see that behaviour here.

 I have read on MSDN that the DPs should be set properly before load event, and in a sample application i see it behaving as per MSDN.

Binding is happening properly as there are no errors in out put window + I get the DP - Property changed events as well, but this happens only after load (I dont know why??)

Any help would really be appreaciated.



How to pass control reference to its property in data binding expression


Here is data binding expression (dropdown list is nested in gridview)

<asp:DropDownList ID="ddlEmployees" 
         DataSource='<%# PayCheckBO.GetEmployeesNameIdPair() %>' 
         SelectedIndex='<%# GetSelectedIndex(HOW TO PASS REF of ddlemployee HERE)%>'/>

Code Behind has function which looks like

public int GetSelectedIndex(DropDownList ddl)
        //loop through the item in the dropdownlist
        //return index based on xyz checks

The whole reason for passing the reference is to save round trip to database and not to use SESSION

Presenting Data with the DataGridView Control in .NET 2.0 > Defining Custom Column and Cell

in this link u can find the explanation about how to bind image column at run time.

Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Easily manipulate data with the GridView control in ASP.NET 2.0

Last week, I introduced ASP.NET 2.0's GridView data control and covered the basics of using it. This week, I go a step further by going into the details of working with the data contained in the control. This includes viewing, editing, and deleting data. Thankfully, the GridView control makes it easy to utilize these features. Before diving into these topics, I begin with an examination of the different field types supported by the GridView control.

Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend