473,326 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Add to Simple Binding pane of DataBinding dialog

Ian
I have sub-classed the Page class in order to provide some base
properties and methods that every page on my site will need access to.

I would like to have these things show up in the Simple Binding
window of the DataBindings dialog. I then found this site
(http://msdn.microsoft.com/library/de...sDialogBox.asp)
which says:

The tree view displays these objects: the Page object; any data source
that derives from the Component class; any objects instantiated in the
page's InitializeComponent method; and any objects that implement the
IEnumerable interface.

So I decided to try to make my objects show up there. Ok, so the
items I wasnted to bind to were already properties of my subclass of
the Page object and they werent showing up, so I decided to try making
a component. I made a new component class and made it a property of
my Page subclass. It didnt show up. I tried instantiating it in an
InitializeComponent method, but this didnt work either and I suspect
that this is somehow tied to being the last class in the inheritance
hierarchy before the parser-generated class. Since the data I want to
expose isn't multi-row, making it IEnumerable doesnt really make much
sense.

For instance, I'd like people to be able to bind to the user's login
name. So I'd like to add a property to my page sub-class:

public string UserName
{ get { return Context.User.Identity.Name; } }

I'd really like to make my properties/objects show up in the simple
binding tree because I'm trying to make it as easy as possible to make
pages based on my inherited base class, and, for better or for worse,
having to type manual binding expressions is probably going to be too
difficult for my "authoring" user base.

The only things I've ever seen in this pane are the Page object
(effectively useless) and the DataSet. I cant see that these two
classes share any attributes that would flag them for inclusion. I'm
assuming that somehow their designers are Siting them in the WebForms
designer's container, but this all appears to be happenning behind the
scenes and the Design namespaces are still woefully under-documented.

Can anyone clear this up? or offer other suggestions for making my
properties show up there?

Ian
Nov 18 '05 #1
0 1437

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robert Ludig | last post by:
How do I bind a textbox to a simple string varaible with databinding? I managed to do the binding but unfortnatedly the textvox does not get updated when I change the string wich the textbox is...
4
by: Dan | last post by:
I'm databinding my DropDownList to a DataSet. How do I add a dummy record at the top of the combo box. In other words, suppose we are dealing with cars I want something like: <select...
9
by: Timm | last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative data binding wherever possible and trying to minimize the use of code. The list of values in DropDownList DDL2 should be...
8
by: scorpion53061 | last post by:
I am sorry for this but I am not getting an answer elsewhere so I thought I would try here. It seems the safer way to go prior to deployment is to change my early binding to late binding to...
0
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
3
by: sham | last post by:
Hi to all, I have an object that has a property numberOfFilesDeleted which is an integer. I want to bind a label to it so that when the value changes, the label gets updated on the screen. I...
3
by: Grumpy Aero Guy | last post by:
Set up a simple ADO.Net Windows app. Set everything up... fill data via ******************************************************************* Dim bmb As BindingManagerBase : : Private Sub...
3
by: Wilson | last post by:
Hi, Can I do data binding for a textbox in a webform at server side ? not using the Data Binding Expression. Thanks Wilson
0
by: opedog | last post by:
I'm monkeying around with databinding, trying to learn all the ins and outs. I'm populating a label from one of my business objects properties which is a string, however, I want some formatting done...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.