1. About binding checkboxes and multiple row fields modification - VB.Net
2. How to bind multiple data items to single control
Hi,
I have a Repeater control and want to bind a hyperlink to each repeated
row. For this I can use the following syntax (excuse any incorrect
naming but I don't have any code to hand):
<asp:Hyperlink id="x" NavigateToUrl='<%# Bind("id", "Page.aspc?id={0}")
%> Text="Text"></asp:Hyperlink>
This all works find but I'd like to be able to bind 2 data items such
as this:
<asp:Hyperlink id="x" NavigateToUrl='<%# Bind("id, name",
"Page.aspc?id={0}&name={1}") %> Text="Text"></asp:Hyperlink>
Obviously this doesn't work, but is there another way to do this?
Thanks
Nick
3. One Usercontrol Multiple Instance in a Single Page --Required Field Validator Problem - Asp.Net
4. Single Field Binding ASP.NET 2.0
Hey I've been looking everywhere and trying a few things but can't figure it out. Is there some documentation somewhere on how DataComponent's work? Not the SQL Data Source or Data Sources in general, but the actual DataComponent where you can define queries (kinda reminds me of a dataset). I want to do simple queries (not multiple rows) and can't seem to bind it to a label control Any help would be appreciated. Thanks, CJ
5. Multiple fields in a single textbox - VB.Net
6. FormView checkbox two-way bind problem with null fields
Hi to all,
I think this question may already have been posted but I couldn't find
any post on this so I'm asking again.
I've a FormView bound to a SQLDataSource.
I've edited the EditItemTemplate placing some checkboxes bound to some
fields. I'm using Bind(FieldName) declarative syntax cause I need to
update these fields. In the source these fields my be empty (null).
When I switch to edit view I get the following error:
Conversion from type 'DBNull' to type 'Boolean' is not valid.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Conversion from type
'DBNull' to type 'Boolean' is not valid.
Source Error:
Line 86: <asp:CheckBox ID="CheckBox1" runat="server"
Checked='<%# Bind("F01MINORI") %>' CssClass="radiolist"
Line 87: Style="z-index: 124; left: 124px;
position: absolute; top: 293px" Text="minore" />
Line 88: <asp:CheckBox ID="CheckBox2" runat="server"
Checked='<%# Bind("F01MINORIH") %>' CssClass="radiolist"
Source File: x:\xxx\xxxxxxx.aspx Line: 86
Now, the source of this error is pretty clear to me. The fields is
empty and conversion from DBNull object to boolean value can not
happen. My question is, being forced to use Bind(), how can I handle
empty fields (not only for checkboxes but for bound controls in
general)?
Is there another way to bind two-way controls?
Thanks in advance.
7. Problem binding multiple properties in one control to a single row - ADO.Net
8. controlling visibility of multiple controls bound to a single property
ok... weirdness... hoping someone can help... i have a list that does
all the stuff that i need to do to bind to it... i want to bind the
visibility of one grid and two different buttons to my list. the
problem is that although the format event gets called multiple times,
it is always the same control that gets passed as the sender. that is,
i set a breakpoint at showControl and i hit the breakpoint four times,
but each time its the grid that is being passed as the sender...
anybody know why this would be the case? my code is blow...
bnd = New Binding("Visible", myList, "ItemName")
bnd2 = New Binding("Visible", myList, "ItemName")
bnd3 = New Binding("Visible", myList, "ItemName")
AddHandler bnd.Format, AddressOf showControl
AddHandler bnd2.Format, AddressOf showControl
AddHandler bnd3.Format, AddressOf showControl
grd.DataBindings.Add(bnd)
btnScrollUp.DataBindings.Add(bnd2)
btnScrollDown.DataBindings.Add(bnd3)
Private Sub showControl(ByVal sender As Object, ByVal e As
System.Windows.Forms.ConvertEventArgs)
Dim bnd As Binding = CType(sender, Binding)
Dim theList As myList = bnd.DataSource
e.Value = theList.hasItems
End Sub